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
Build schema with buildSchema
or programmatically?
#596
Comments
Very interesting question. If you can, you should use |
I'm in the process of putting together a module based type/schema repository. It's goal is to allow service teams to manage their own types, and put back-references into upstream types using the extension syntax. Still building the graph parser, then there's unmarshalling, and there's no readme, but the tests for the config should give you an idea as to how the bits are specified. Be good to know if this is the sort of thing you're looking for. |
Thanks @langpavel for your reply, it helps! I've been playing with this new approach this weekend and I came up with a very nice solution which I'd like to share with you. @jamesgorman2 thanks for sharing! As I can see from your tests, you found pretty similar solution to what I described above! This only confirms that this is the right way to do it (using models/classes) and using Thank you both for directions! Closing ... |
We have developed a package that makes it easy to use the schema language while also writing resolvers: http://dev.apollodata.com/tools/graphql-tools/index.html |
Thanks @stubailo! |
@stubailo Can you point me to a large project that uses |
I built my first GraphQL server months ago. Back then I followed @leebyron's proposal: for more complex schema we recommend building the schema programmatically. After a few months I visited graphql.org website again and I saw that the first example on how to build a schema is using the
buildSchema
method and is not done programmatically.I wonder ... is using
buildSchema
a preferred way for creating a schema? I still find the programmatic way easier for production-level products.The text was updated successfully, but these errors were encountered: