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

Add support for operationName in API.graphql #488

Open
TuckerWhitehouse opened this issue Dec 28, 2020 · 2 comments
Open

Add support for operationName in API.graphql #488

TuckerWhitehouse opened this issue Dec 28, 2020 · 2 comments
Labels
feature-request New feature or request GraphQL

Comments

@TuckerWhitehouse
Copy link

Is your feature request related to a problem? Please describe.
Using API.graphql with GraphiQL does not work with multiple queries in the editor.

Describe the solution you'd like
API.graphql accepts query and variables, it would be great to have it accept operationName as well.

Describe alternatives you've considered
I think it's possible to manually construct a fetch request with the appropriate headers, but that forgoes using the amplify api packages entirely.

Additional context
Named operations and passing an operationName are part of the GraphQL specification
http://spec.graphql.org/June2018/#sec-Executing-Requests

@TuckerWhitehouse TuckerWhitehouse added the feature-request New feature or request label Dec 28, 2020
TuckerWhitehouse referenced this issue in TuckerWhitehouse/amplify-js Dec 28, 2020
@TuckerWhitehouse
Copy link
Author

@bengiddins
Copy link

With the release of AWS_LAMBDA as an authorization method for AppSync, I would also like to see this operationName available. Requests direct from the AppSync console return a populated operationName variable in the request context to Lambda, however calls to the same AppSync API from Amplify result in an empty operationName with no way of setting it.

@stocaaro stocaaro transferred this issue from aws-amplify/amplify-js Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request GraphQL
Projects
None yet
Development

No branches or pull requests

3 participants