vue.jsgraphqlhasurahasura-jwtmagic-sdk

having problem with graphql and magic api . how to apply mutations and queries on a server to create a schema


I have two GraphQL files: mutations.js and queries.js under a gql folder...

This folder contains GraphQL mutations and queries used across the app.

📁 gql
  🅙 mutations.js
  🅙 queries.js

I set up the GraphQL endpoint, but i keep getting this error:

Uncaught (in promise) Error: GraphQL error: field "users" not found in type: 'query_root'

NB: None of the GraphQL queries or mutation contain errors


Solution

  • I added tables manually and added some rows after creating a Heroku PostgreSQL database, linking it to my hasura app, and putting this line in .env:

    GRAPHQL_URI="https://definite-XXX-XX.hasura.app/v1/graphql"