Closed karneyli closed 4 years ago
Hey, thanks for the great question. This library has some support for parsing a schema from the GraphQL SDL, described here: https://graphql-ruby.org/schema/sdl.html
I haven't worked on it a ton because I don't have a practical use case, but I've heard of big orgs with big schemas run that way! Anyhow, hope that helps. If you have specific questions or suggestions regarding SDL support, please don't hesitate to ask or open a PR :+1:
The library defaults to a code-first approach (e.g. developers define ruby type classes, resolvers, etc and generate a schema artifact post). Code-first has some inherent advantages, notably the schema and the code cannot be out of sync and no schema vs code duplication (if code-generation is used to generate ruby classes).
One notable advantage to schema-first is it allows developers to operate at the contract level, this affords client and server side developers to work at the same time instead of waiting for the server to be completed. The schema-first approach also makes it possible to provide mock data for the API so the client can be tested independently.
Has there been discussion about supporting schema-first approach in the library?