-
Notifications
You must be signed in to change notification settings - Fork 126
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
One Graph Principle #2
Comments
Can you post a link to what you are referring to. I dont see how this breaks the one Graph principle. |
Nest compiles the schema in one root schema. This example is missing a key setup in app.module.ts. Notice the path join to compile one graph from each module's graphs. This gives us the best of both "one graph" and keeping everything in modules. This is Apollo's conceptual framework: https://principledgraphql.com
|
I get the following error and cannot advance through the series UnhandledPromiseRejectionWarning: Error: No type definitions were found with the specified file name patterns: "./**/*.graphql". Please make sure there is at least one file that matches the given patterns. |
Apollo has released their best practices guide for GraphQL based on their work with hundreds of organizations. One of those principles is that we should use one graph. When I asked online about this I was told that all the big kids are using one schema for all queries, types, and mutations. I'm not sure about resolvers yet but my impression is that one page does it all for all modules. So it lives at the root level. Once source of truth.
You are breaking the graph into their relevant modules as we do with everything else including REST. This architecture should probably be re-examined.
Meanwhile, I'm trying to deal with a mental breakdown from trying to get my head around all of GraphQL in one super module. :-)
The text was updated successfully, but these errors were encountered: