drupal-graphql / graphql

GraphQL integration for Drupal 9/10
288 stars 201 forks source link

Question about where to modify code to add resolvers? #1289

Open laurencefass opened 2 years ago

laurencefass commented 2 years ago

I am having difficulty locating the correct place to add resolvers and I think the interface may have shifted

I am working from here: https://drupal-graphql.gitbook.io/graphql/queries/nodes

Section AddTheSchemaDeclaration provides a filename to work with.

Section AddingResolvers doesnt specify which file to update.

If I look into both of your default module examples I see:

graphql_example/...src/Plugin/Schema/ExampleSchema.php contains a getResolverRegistry() function.

graphqul_composable/......src/Plugin/Schema/ComposeableSchemaExample does NOT contain a getResolverRegistry() function.

However ComposableSchemaExampleExtension.registerResolvers() does appear to have similar function to getResolverRegistry() mentioned in the docs.

Thanks