-
Notifications
You must be signed in to change notification settings - Fork 134
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
Apollo Server usage example is not correct for adding resolvers and typeDefs to schema #1620
Comments
This was referenced May 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In the Usage with Apollo Server example https://www.graphql-scalars.dev/docs/usage/apollo-server#usage-with-apollo-server-1 it seems the spread operators for the schema may need to be cleaned up! I struggled a little bit to get it work(might help other beginners). For typedefs, only spread the scalarTypeDefs since the other typeDefs are already a string. And for resolvers, merge the two objects and not spread them into a new array.
To Reproduce
Copy the Apollo Server usage example here into your project and it will not work.
Expected behavior
It should be written as below:
Environment:
Additional context
See discord discussion here
The text was updated successfully, but these errors were encountered: