hasura / hasura/graphql-engine

Remote Schema Permissions gives a result of " \"endOfInput\"","

Open
#7,782 5 comments 0 reactions 1 assignee Claimed by @mattshardman View on GitHub
c/console k/bug t/gql-services
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: fedormelexin/graphql-engine-arm64:v2.0.10.cli-migrations-v3

### Environment

Cloud and in this engine

### What is the expected behaviour?

Right now I am trying to add remote schema permissions from Hasura to GraphCMS

### Keywords

Remote Schema, Remote permissions, schema stitching, GraphCMS remote schema permissions

### What is the current behaviour?

With GraphCMS we have to give a default value to the `where: stage: locales:` fields. I am inserting values in the following syntax: {"PUBLISHED"} and {[nl_NL]}, it results in the following error:

`{
"path": "$.args[0].args.definition.schema",
"error": "parsing the schema document: \"endOfInput\"",
"code": "parse-failed"
}`

This is assuming that I did everything correctly, it gives a result of " \"endOfInput\"","

### How to reproduce the issue?

1. Add a remote schema to GraphCMS with full permissions [How-to](https://graphcms.com/blog/hasura-fit-setting-up-hasura)
2. Pick a standard GraphCMS setup, now you should see some tables in Hasura.
3. Add HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS env variable to _true_.
4. Now try to add remote permissions to Type Query, select a table and you will get this error.

### Screenshots or Screencast

![Screenshot 2021-11-06 at 09 26 30](https://user-images.githubusercontent.com/35261620/140603331-64f436e0-a716-42d9-925b-7ecd623dac69.png)

![Screenshot 2021-11-06 at 09 26 38](https://user-images.githubusercontent.com/35261620/140603332-3734a38c-c66e-47b9-9b76-f6732cf476e3.png)

### Please provide any traces or logs that could help here.

![Screenshot 2021-11-06 at 09 30 24](https://user-images.githubusercontent.com/35261620/140603387-ef554d4b-1ebb-41da-b83e-5a695cc7465d.png)

### Any possible solutions?

Sorry, no.

### Can you identify the location in the source code where the problem exists?

No, wish I could.

### If the bug is confirmed, would you be willing to submit a PR?

Unfortunately, I am not a genius

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.