Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. Authorize

To work with GraphQL, you first need to request an access token, see Authorization.have Access Token and API Key.

See Authorization for more details.

2. Explore

To understand which data and actions are available via GraphQL, please go to to https://gql.doo.net and check the side bars “Docs” and “Schema”.

You can also use this page to manually post GraphQL queries if you are developing you query.test your GraphQL queries there.

To make a test request, add the Access Token into the HTTP Headers section like the following:

Code Block
languagejson
{
  "authorization": "Bearer <access_token>"
}

...

3. Use

Note

While you can use https://gql.doo.net for exploration, we strongly recommend using https://graphql.doo.net for production as we’re planning to deprecate https://gql.doo.net soon.

Example of the HTTP request to get event information using Event ID.

Code Block
languagebash
curl -X POST 'https://graphql.doo.net' \
-H 'content-type: application/json' \
-H 'accept: application/json' \
-H 'x-api-key: <api_key>' \
-H 'authorization: <access_token>' \
-d '{"query":"query($eventId: ID!) {event(id: $eventId) {id title startDate endDate status type isVirtual logoUrl cover {originalUrl} description {short long} currency {code} address {country city zip street houseNumber venueName} organizer {name email phone contactPerson} totalEventCapacity totalAmount organization {id}}}","variables":{"eventId":<event_id>}}'

Replace the following placeholders with the real data to make it work: <api_key>, <access_token>, <event_id>.

Formatted GraphQL query from this request:

Code Block
languagegraphql
query":"query($eventId: ID!) {
  event(id: $eventId) {
    id 
    title 
    startDate 
    endDate 
    status 
    type 
    isVirtual 
    logoUrl 
    cover {
      originalUrl
    } 
    description {
      short 
      long
    } 
    currency {
      code
    } 
    address {
      country 
      city 
      zip 
      street 
      houseNumber 
      venueName
    } 
    organizer {
      name 
      email 
      phone 
      contactPerson
    } 
    totalEventCapacity 
    totalAmount 
    organization {
      id
    }
  }
}

4. Learn more

To understand GraphQL queries, we recommend the https://graphql.org/learn/

...