Closed exedary closed 1 year ago
Could you provide the GraphQL metadata and how the mutation should look like?
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
description
locations
args {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type { ...TypeRef }
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
sry, github does not allow to upload in json format
Any updates?
There are two issues with your query
var request =
new MutationQueryBuilder()
.WithCreateJob(
new JobQueryBuilder().WithAllScalarFields(), // you are missing to query at least one field from WithCreateJob mutation, GraphQL doesn't support void mutations
input /* this is GraphQL parameter reference, OK */)
.WithParameter(input) // missing - this is GraphQL parameter definition
.Build()
Thank you! By the way it works with
var request = new MutationQueryBuilder()
.WithCreateJob(
new JobQueryBuilder().WithId(),
input)
.Build();
I mean without .WithParameter()
Probably depends on the server implementation but it's not valid query without the parameter definition. You should get something like Variable "$parameterName" is not defined.
When building mutation, and there is no any values to retrun specified mutation is empty. Example:
Returns "mutation{{}}"