Skip to content

Support programmatic GraphQLSchema creation #4

Closed
@andimarek

Description

@andimarek

Sometimes a GraphQLSchema is not created via a SchemaGenerator but programmatically:

    GraphQLObjectType queryType = newObject()
            .name("QueryType")
            .field(newFieldDefinition()
                    .name("hello")
                    .type(GraphQLString)
                    .dataFetcher(new StaticDataFetcher("world!"))
            .build();

    GraphQLSchema schema = GraphQLSchema.newSchema()
            .query(queryType)
            .build();

More at: https://www.graphql-java.com/documentation/v11/schema/

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions