Skip to content

This is the documentation for how to make a request via GraphiQL against Cooper Hewitt's TMS database. To make a request, an access token is required from Cooper Hewitt's digital team.

Notifications You must be signed in to change notification settings

cooperhewitt/ch-api-v2-internal-graphiql-documentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

API - GraphQL Query Documentation with examples

Quick links:

Entities:

Extras:

Examples:

Introduction

GraphQL queries follow this basic structure:

{
  object (arguments) {
    fields
  }
}

The resultant data follows the same structure as the query

{
  "data": {
    "object": {
      "field": value
    }
  }
}

There is also an extensions block in addition to the data response. This follows the GraphQL specifications and allows us to write more detailed responses, including information regarding pagination and aggregations.

  "extensions": {
    "aggregations": {
      "department": {
        "buckets": [
          {
            "key": "Drawings, Prints, and Graphic Design Department",
            "doc_count": 129079
          },
          {
            "key": "Product Design and Decorative Arts Department",
            "doc_count": 28924
          },
          ...
        ]
      }
    },
    "pagination": {
      "hits": 196951,
      "per_page": 10,
      "current_page": 0,
      "number_of_pages": 19696
    }
  }

About

This is the documentation for how to make a request via GraphiQL against Cooper Hewitt's TMS database. To make a request, an access token is required from Cooper Hewitt's digital team.

Resources

Stars

Watchers

Forks

Packages

No packages published