Skip to main content

GraphQL Queries

For modifying existing and creating new GraphQL queries, you can make use of the Apollo GraphQL Client.

import { gql } from '@apollo/client'

const EVENT_STREAM_REQUEST = gql`
query UserInfo {
userInfo {
id
name
permissions
superuser
mail
}
}
`

Apollo GraphQL uses codegen to generate typescript types for queries. To do so you'll need to run npm run compile. This requires the trajectory-trace backend to be running on localhost:3001. Refer to Building the Backend on how to start the backend locally.

info

You can use the backends GraphiQL interface to edit the query. You can reach the UI on http://localhost:3001/api/graphql.