0
votes

I defined some custom scalars in my GraphQL schema. If I query for data the custom scalars can be available on various places. Is it possible to extract them from a GraphQL response in a generic way?

So I get the response and then I want to extract all values of a scalar I defined into an array. Based on the schema the information is available. Is the some JavaScript library, which can do that?

I use Apollo Server and JavaScript on the client.

1

1 Answers

0
votes

Use local resolver - @client directive - it can read other fields/cache to /collect/convert/provide required data.