Skip to main content

printSchema

Callable


  • Returns a string representation of the given GraphQLSchema in SDL format.

    Note: This function will not print directives in the SDL format. If your intent is to print a schema with directives, use printSchemaWithDirectives instead.

    Example

    Given a schema, convert it to SDL

    const sdl = printSchema(schema);

    Parameters

    Returns string