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

Normal queries should use data field #2

Open
popstr opened this issue Apr 29, 2020 · 1 comment
Open

Normal queries should use data field #2

popstr opened this issue Apr 29, 2020 · 1 comment

Comments

@popstr
Copy link

popstr commented Apr 29, 2020

Hey Oded!
You have provided a really nice and useful example. Thank you for that!

However, I think you have an error in the RepositorySchema class. When doing a normal query (not introspection), we need to return the data under the a field called "data", just like we do in the Introspection case. See response examples at https://graphql.org/learn/queries/

This is the line that outputs the data without the data field:

returnData = graphQL.execute(queryString,query).getData();

I'll make you a PR unless you have a different opinion on the issue.

@popstr
Copy link
Author

popstr commented Apr 29, 2020

See PR here: #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant