How do I define a typeDefs in a Schema for the following Response

How do I define a typeDefs in a Schema for the following Response


0

I am Trying to Define a typeDefs for the following response in graphql

CompactRes={
  "Compact": [
    [
      0,
      1,
      2,
      3
    ],
    [
      4,
      5,
      6,
      [
        7,
        2.567
      ]
    ]]}
  

Here is my Schema

const typeDefs = gql`
type Compact{
compact:[[Float]]
  }
 type Query {
    response(count: ID!): Compact
  }
`;
const resolvers = {
  Query: {
    response: (parent, args, context, info) =>{
      return CompactRes;
        },
     },
};
 

Getting Following error when I run this

How do I define a typeDefs in a Schema for the following Response


Load 6 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *