Skip to content

Add readEnvironment field to GraphQL API

Leaminn Ma requested to merge 381095-add-readenvironment-field-to-graphql into master

What does this MR do and why?

Adds the readEnvironment field to the GraphQL API (under project permissions). This will enable FE to check if the current user has permissions to read the environments and hide related features accordingly.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Go to GraphiQL explorer http://gdk.test:3000/-/graphql-explorer
  2. Run the following query:
query CanReadEnvironment {
  project(fullPath: <project-path>) {
    __typename
    id
    userPermissions {
      readEnvironment
    }
  }
}
  1. Check that the result shows the readEnvironment value as true or false as applicable.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #381095 (closed)

Edited by Leaminn Ma

Merge request reports