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
docs: Either "schema" OR "typeDefs + resolvers" are required. #4684
Comments
This is exactly what I do, and it just works. What is the error? |
@wmertens can you tell me how do you do? |
@JoseJuan81 I do what you write, I pass a GraphQLSchema instance to ApolloServer. What is the error you're getting |
@wmertens Hi, I read in the docs that the Maybe the error is in the docs because there is no indication neither example about GraphQLSchema syntax implementations. |
So when you try to use your example, you don't get an error, but it also doesn't work? Because my code is pretty much like your example and it just works... |
Ok, @wmertens you're right, I just made a small test in development mode and works... In the code The ApolloServer needs one of them. |
It is true that ( Generally speaking, PRs are welcome! cc @StephenBarlow for suggestions on how we might render this effectively (or if we should merely use our words to do so!) |
And as the code above points out, there's a third option of using (the incredibly undocumented, I think?) |
See also: #4386 |
I must say, my project now use GraphQLSchema over than SDL and that was somethig that I wanted, so thank you @wmertens and @abernix . |
The docs are pretty clear about this now, I hope. |
Hi, apollo team
The
apollo-server
only accepts SDL syntax when is created (typeDefs
andresolvers
):I wish can pass
GraphQLSchema
object syntax directly into ApolloServer instance.I like this syntax over SDL but Apollo doesn't support it.
The text was updated successfully, but these errors were encountered: