GraphQL interface between frontend and backend

Notes for when we start to connect the backend up to the frontend

list secrets as of 2024-04-10

Once secret data and pagination is available via the backend, we can switch over to it by:

  • removing the client-side resolvers and pagination from graphql/settings.js
  • removing @client from the query
  • moving the query file out of the /client directory

Query proposal: list secrets

query getSecrets($fullPath: ID!, $isGroup: Boolean = false, $first: Integer, $after: String) {
  group(fullPath: $fullPath) @include(if: $isGroup) {
    id
    fullPath
    secrets(first: $first, after: $after) {
      count
      nodes {
        id
        key
        name
        labels
        lastAccessed
        createdAt
      }
      pageInfo {
        ...PageInfo
      }
    }
  }
  project(fullPath: $fullPath) @skip(if: $isGroup) {
    id
    fullPath
    secrets(first: $first, after: $after) {
      count
      nodes {
        id
        key
        name
        labels
        lastAccessed
        createdAt
      }
      pageInfo {
        ...PageInfo
      }
    }
  }
}

Query proposal: get secret details

#TODO

Mutation proposal: create/update secret

#TODO

Mutation proposal: delete secret

#TODO
Edited by 🤖 GitLab Bot 🤖