Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Fragments not working on the local dev server (working on AppSync) #112

Closed
tomschut opened this issue Feb 16, 2023 · 3 comments · Fixed by #147
Closed

Issue: Fragments not working on the local dev server (working on AppSync) #112

tomschut opened this issue Feb 16, 2023 · 3 comments · Fixed by #147
Labels
is: bug Something isn't working is: investigating Something isn't working
Milestone

Comments

@tomschut
Copy link

Hi,

I've found a small bug in the dev server.
When using fragments the following error is returned:
Unknown field SeoFields for select statement on model seo. Available options are listed in green.
Our fragment is called SeoFields fyi.

On AppSync this error does not occur.

Kind regards,

Tom

@maoosi
Copy link
Owner

maoosi commented Feb 17, 2023

I must admit I have never tried using fragments with Prisma-AppSync.

Will look into this after the next release!

@maoosi maoosi added is: investigating Something isn't working is: bug Something isn't working labels Feb 17, 2023
@maoosi maoosi moved this to Planned in Prisma-AppSync Roadmap Feb 17, 2023
@maoosi maoosi added this to the 1.0.0-rc.7 milestone Feb 17, 2023
@maoosi maoosi changed the title fragments not working in dev run Issue: Fragments not working on the local dev server (working on AppSync) Feb 17, 2023
@tomschut
Copy link
Author

I'm also not sure how exactly graphql handles fragments, but what I see happening is that the identifier of the fragment, which should be interpolated at some point I suppose, is fed directly to the prisma client.

One way of fixing this would be interpolating it, but I have a feeling that there's a better solution to be found by using the dev server in another way, because the useLambdaFunction plugin probably prevents yoga from parsing anything, but that's just a wild guess.

type: 'INTERNAL_SERVER_ERROR',
code: 500,
cause: PrismaClientValidationError: ... elect: {
id: true,
layout: true
}
}
}
}
}
}

Unknown field <FragmentName> for select statement on model . Available options are listed in green.

@maoosi
Copy link
Owner

maoosi commented Jun 10, 2023

Will be released as part of 1.0.0-rc.7.

@maoosi maoosi closed this as completed Jun 10, 2023
@maoosi maoosi moved this from Planned to Ready to release in Prisma-AppSync Roadmap Jun 10, 2023
@maoosi maoosi moved this from Ready to release to Released in Prisma-AppSync Roadmap Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug Something isn't working is: investigating Something isn't working
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants