-
I have an input CreationInput {
name: String!
"This field doesn't exist at the public API, but at the API of the GraphQLService behind the gateway"
slug: String
}
type Mutation {
create(input: CreationInput!): MyEntity!
} The exposed API doesn't come with the ...
args['slug'] = 'someSlug'
await delegateToSchema({
...
schema: myRemoteSchemaFromAbove // I've checked, the schema's input type comes with slug
args: args,
info: info, // untouched
...
}) But this field is ignored, my GraphQL service receives an request where the // just a sketch, I wouldn't modify `info` and I would use constants
info.fieldNodes[0].arguments[0].value.fields = info.fieldNodes[0].arguments[0].value.fields.concat({
kind: 'ObjectField',
name: { kind: 'Name', value: 'slug' },
value: { kind: 'StringValue', value: slug }
}); But I wonder whether there's a more straight-forward way. Thanks for any thoughts on that! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You can add your additional arguments to
Is this what you need? Otherwise please create a reproduction on CodeSandbox or StackBlitz. Thanks! |
Beta Was this translation helpful? Give feedback.
You can add your additional arguments to
args
;Is this what you need? Otherwise please create a reproduction on CodeSandbox or StackBlitz. Thanks!