You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that you need to explicitly add the auto-generated queries and mutations if they are needed when configuring custom queries, like it's done for the [operations](#operations).
329
+
321
330
As you can see, it's possible to define your own arguments for your custom queries.
322
331
They are following the GraphQL type system.
323
332
If you don't define the `args` property, it will be the default ones (for example `id` for an item).
@@ -445,6 +454,13 @@ use App\Resolver\BookMutationResolver;
445
454
446
455
#[ApiResource(
447
456
graphql: [
457
+
// Auto-generated queries and mutations
458
+
'item_query',
459
+
'collection_query',
460
+
'create',
461
+
'update',
462
+
'delete',
463
+
448
464
'mutation' => [
449
465
'mutation' => BookMutationResolver::class
450
466
],
@@ -467,6 +483,8 @@ class Book
467
483
}
468
484
```
469
485
486
+
Note that you need to explicitly add the auto-generated queries and mutations if they are needed when configuring custom mutations, like it's done for the [operations](#operations).
487
+
470
488
As the custom queries, you can define your own arguments if you don't want to use the default ones (extracted from your resource).
471
489
The only difference with them is that, even if you define your own arguments, the `clientMutationId` will always be set.
0 commit comments