hasura / hasura/graphql-engine

Remote Schema Role Permission Definition Not Properly Formatted when too long

Open
#7,323 0 comments 1 reaction 0 assignees View on GitHub
c/cli
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

We require finer-grained permissions and this makes our `remote_schema.yml` file quite large with the number of permissions definitions per role.

We noticed that when creating the `remote_schema.yml` file from the UI, if the list of permissions becomes too long the permission `definition` section is formatted as a string and not in the proper YAML format.

This leads to problems when trying to use `hasura metadata apply`, so we have to manually re-format and tophat the yaml file before applying.

``` permissions:
- role: user
definition:
schema: |-
schema { query: Query mutation: Mutation }

type Mutation { saveVideoResponse(id: String, input: VideoResponseInput!): Boolean!
}

type Query { _service: _Service
}

type _Service { sdl: String!
}

input VideoResponseInput {contactId: String!
interactionLink: String!
}
- role: candidate
definition:
schema: "schema { query: Query mutation: Mutation }\n\ntype Candidate { address:
String\n appliedTime: Float\n bacbCertificationNumber: String\n cityLocation:
String\n desiredStartDate: String\n emailAddress: String!\n employmentType:
....
```

If this fix is accepted, I would love to write the code for it :).

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.