MCPcopy
hub / github.com/dgraph-io/dgraph / GetMutation

Function GetMutation

graphql/test/test.go:62–69  ·  view source on GitHub ↗

GetMutation gets a single schema.Mutation from a schema.Operation. It will fail if op is not a mutation or there's more than one mutation in op.

(t *testing.T, op schema.Operation)

Source from the content-addressed store, hash-verified

60// It will fail if op is not a mutation or there's more than one mutation in
61// op.
62func GetMutation(t *testing.T, op schema.Operation) schema.Mutation {
63 require.NotNil(t, op)
64
65 mutations := op.Mutations()
66 require.Len(t, mutations, 1)
67
68 return mutations[0]
69}
70
71// GetQuery gets a single schema.Query from a schema.Operation.
72// It will fail if op is not a query or there's more than one query in

Callers 8

benchmark3LevelDeepFunction · 0.92
deleteMutationRewritingFunction · 0.92
mutationRewritingFunction · 0.92
TestCustomHTTPMutationFunction · 0.92
mutationQueryRewritingFunction · 0.92
deleteQueryRewritingFunction · 0.92
checkAddUpdateCaseFunction · 0.92

Calls 2

MutationsMethod · 0.65
LenMethod · 0.65

Tested by 8

benchmark3LevelDeepFunction · 0.74
deleteMutationRewritingFunction · 0.74
mutationRewritingFunction · 0.74
TestCustomHTTPMutationFunction · 0.74
mutationQueryRewritingFunction · 0.74
deleteQueryRewritingFunction · 0.74
checkAddUpdateCaseFunction · 0.74