/graphql/examples/
and copy all the files from the example module to a custom module of your own. By doing this you can then start adapting the schema to your needs including your own content types and making them available in the schema./graphql
) as well as other options like if query batching or caching are enabled./admin/config/graphql
to create a new server for your custom schema. When creating the server choose the "Composable Example schema" as the schema and make sure to check the Composable Example extension
checkbox. After saving click "Explorer". This will take you to the "GraphiQL" page, where you can explore your custom schema./graphql
folder of the module you will find some files that are a common .graphqls
file that your editor will likely pick up as GraphQL files already. They include the schema definition for your custom schema.Query
and so to define new queries you have to add them here in the extension.graphqls file.src/Plugin/GraphQL/Schema
and optionally src/Plugin/GraphQL/SchemaExtension
:src/Plugin/GraphQL/Schema
by defining resolvers directly inside the getResolverRegistry
method.