Skip to content
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

Support of serialization and deserialization of GraphqlSchemas #4794

Open
Tracked by #5201 ...
tobiasdiez opened this issue Oct 28, 2022 · 0 comments
Open
Tracked by #5201 ...

Support of serialization and deserialization of GraphqlSchemas #4794

tobiasdiez opened this issue Oct 28, 2022 · 0 comments

Comments

@tobiasdiez
Copy link
Contributor

tobiasdiez commented Oct 28, 2022

Is your feature request related to a problem? Please describe.

I have a quite complex graphql schema spreading over a couple of files. In order to improve the cold start time of the deployed server, I would like to perform the parsing and merging of the schema during build and not during runtime.

Describe the solution you'd like

Have helper methods that allow to serialize a GraphqlSchema AST (without resolvers) to say JSON, and then latter deserialize from it again to generate the GraphqlSchema. That is, a performant version of printSchema and loadSchema.

Describe alternatives you've considered

Serialize the merged schema using printSchema, and then load it at runtime via loadSchema. But I would like to move the "parse the schema to AST" to build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant