Skip to content

Support of serialization and deserialization of GraphqlSchemas #4794

@tobiasdiez

Description

@tobiasdiez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions