Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Schema Role Permission Definition Not Properly Formatted when too long #7323

Open
ericxiao251 opened this issue Jul 30, 2021 · 0 comments
Labels
c/cli Related to CLI

Comments

@ericxiao251
Copy link

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.

  - 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 :).

@0x777 0x777 added the c/cli Related to CLI label Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/cli Related to CLI
Projects
None yet
Development

No branches or pull requests

2 participants