How do I write a graphql-tag when the data is only returning a Boolean?

264 views Asked by At

The server end is using REST to return on a true or a false. How do write a graphql-tag on this?

this is what the server returns : { true }

I tried:

const GET_ACCESS = gql`
  query getAccess {
    access @rest(type: "access", method: "GET" path: "/access") {
      access
    }
  }
`

But nothing is returned, as my json object is not {access: true} it just { true }

0

There are 0 answers