Closed benjie closed 5 months ago
e.g. to have the edges be auto-added to a mutation payload you'd need to add the scopes:
isMutationPayload: true, pgTypeResource: myResource,
In V4 you'd do this with the @scope directive; but no such directive exists in V5 currently (there's a "TODO" to add support).
@scope
Maybe, rather than using the directive (which was always an ugly hack) we can add a scopes key to the callback result:
scopes
return { typeDefs: ..., scopes: { object: { CustomCreateDependencyPayload: { isMutationPayload: true, pgTypeResource: myResource, } }, field: { MyType: { myField: { // scope here } } } }, plans: { ... } };
This could be done strongly typed, so is definitely preferable.
Context: https://discord.com/channels/489127045289476126/1139362114595729482/1139483239401136239
Need expressed by: @sgrove
e.g. to have the edges be auto-added to a mutation payload you'd need to add the scopes:
In V4 you'd do this with the
@scope
directive; but no such directive exists in V5 currently (there's a "TODO" to add support).Maybe, rather than using the directive (which was always an ugly hack) we can add a
scopes
key to the callback result:This could be done strongly typed, so is definitely preferable.
Context: https://discord.com/channels/489127045289476126/1139362114595729482/1139483239401136239
Need expressed by: @sgrove