skip to Main Content

I am using graphql-request to get my data from Hygraph in expo SDK 51 react native app.

I get the error:

Unable to resolve "graphql-request" from "constantsGlobalApi.ts"

I looked through and nothing works. I have install graphql-request using

npm add graphql-request graphql

Anyone with help?

2

Answers


  1. in package.json

    {
      "graphql": "^16.8.1",
      "graphql-request": "^6.0.0"
    }
    
    Login or Signup to reply.
  2. import { request, gql } from "../node_modules/graphql-request/package.json";

    this working for me

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search