Hi here. How do I type remote data in graphql? I w...
# orm-help
y
Hi here. How do I type remote data in graphql? I want to fetch data from remote server, combine with data from local db and return it from resolver. But of course it doesn’t work, i get
Cannot query field "snippet" on type "Video"
. This is obvious, because I don’t have this field in my
Video
type. Do I have to type remote data as well? If yes, how do I type the following data structure:
Copy code
thumbnails: {
  default: {
    url: "<https://i.ytimg.com/vi/Tro6SQJJ8tA/default.jpg>",
    width: 120,
    height: 90
  },
  medium: {
    url: "<https://i.ytimg.com/vi/Tro6SQJJ8tA/mqdefault.jpg>",
    width: 320,
    height: 180
  },
  high: {
    url: "<https://i.ytimg.com/vi/Tro6SQJJ8tA/hqdefault.jpg>",
    width: 480,
    height: 360
  },
  standard: {
    url: "<https://i.ytimg.com/vi/Tro6SQJJ8tA/sddefault.jpg>",
    width: 640,
    height: 480
  },
  maxres: {
    url: "<https://i.ytimg.com/vi/Tro6SQJJ8tA/maxresdefault.jpg>",
    width: 1280,
    height: 720
  }
},
?
h
You need a add a custom video type in your yoga or apollo server
that also returns this data, dont use the prisma provided one