0

My query input is something like:

[{name: "joe", age: 20}, {name: "bob", age: 30}]

Then I use a resolver to return something similar like:

[{name: "joe", age: 20}, {name: "bob", age: 30}, {name: "jane", age: 21}]

Suppose I don't change the dataset, so no need to use mutate.

I am using flask_graphql and graphene

What's the better way to implement this? (I mean how to build the schema) Thanks!

kww
  • 411
  • 4
  • 12
  • 21

1 Answers1

1

Not sure on use case but GenericScalar might help.

data = graphene.GenericScalar()

In mutation, this won't have any specific schema though. Input can accept any structure.

Nikhil Rupanawar
  • 4,061
  • 10
  • 35
  • 51