Skip to content

Add Query.todo(id) to GraphQL API

What does this MR do and why?

This adds the possibility to query a todo by its GlobalID. The GlobalID is available in the list but has no other use because you can't query a single todo by the GlobalID.

Screenshots or screen recordings

image

image

How to set up and validate locally

  1. Checkout branch
  2. Start GDK
  3. Sign in and make sure you have Todos
  4. Get a GlobalID of a Todo
query {
  currentUser {
    todos {
      nodes {
        id
      }
    }
  }
}
  1. Query a single Todo by its ID
query {
  todo(id: "<gid>") {
    id
    body
  }
}
  1. Impersonate another user
  2. Execute the Query of Step 5 again and see, that the Todo is not returned

MR acceptance checklist

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

Merge request reports

Loading