1

I need to send a mutation from my website to my graphql API, which would save some data in my database and return an object queried from a third party API.

The object returned from the third party API is unpredictable, thus I cannot provide any type to the returned payload in my schema:

type Mutation {
    searchMovie(title: String!, poster: String!): ***HERE***
}

Is there some kind of "Any" graphql type that I am not aware of?

So far, my only solution is to stringify the object in order to give it the type "String". However, I prefer to avoid this method if I can.

kurashima
  • 103
  • 6
  • This is a duplicate. [This exact question has been asked before](https://stackoverflow.com/questions/45598812/graphql-blackbox-any-type), although what you probably want is a [JSON scalar](https://stackoverflow.com/a/53127292/6024220). – Daniel Rearden Feb 16 '19 at 14:46
  • 1
    Possible duplicate of [GraphQL Blackbox / "Any" type?](https://stackoverflow.com/questions/45598812/graphql-blackbox-any-type) – David Maze Feb 16 '19 at 14:48

0 Answers0