Discovering the Schema
There are three options to discover the GraphQL schema:
  • Download the publicly available GraphQL schema file (quickest)
  • Use Panther's GraphQL Playground (most user-friendly)
  • Perform an introspection query against the GraphQL endpoint (best for tools and services)

Downloading the GraphQL schema file

You can download the latest version of the GraphQL schema file here.

Using the GraphQL Playground

Panther's API Playground is a user-friendly way of browsing and discovering what's supported in our API. Please refer to our API Playground docs for information on how to use this as a discoverability mechanism.

Performing an introspection query

An introspection query yields all the GraphQL API's entities in a format that most third-party libraries can parse. This discoverability option is useful if you want to make another library or service aware of the supported operations and types that the Panther API has. These libraries typically issue their own version of an introspection query, so they only need to be pointed to an API URL.
For security purposes, the introspection query is an authorized operation. This means that you'll need to add an X-API-Key header to your HTTP call with the value of an API Token in order for the introspection to work.
1
$ curl -H "X-API-Key: <API_KEY>" -d <INTROSPECTION_QUERY> <YOUR_PANTHER_API_URL>
Copied!
The actual shape of the introspection query is customizable. You can ask for a limited set of entities or for all possible information about the schema. For example, a query such as the following would yield every single piece of schema information:
1
query IntrospectionQuery {
2
__schema {
3
queryType { name }
4
mutationType { name }
5
types {
6
...FullType
7
}
8
directives {
9
name
10
description
11
locations
12
args {
13
...InputValue
14
}
15
}
16
}
17
}
18
fragment FullType on __Type {
19
kind
20
name
21
description
22
fields(includeDeprecated: true) {
23
name
24
description
25
args {
26
...InputValue
27
}
28
type {
29
...TypeRef
30
}
31
isDeprecated
32
deprecationReason
33
}
34
inputFields {
35
...InputValue
36
}
37
interfaces {
38
...TypeRef
39
}
40
enumValues(includeDeprecated: true) {
41
name
42
description
43
isDeprecated
44
deprecationReason
45
}
46
possibleTypes {
47
...TypeRef
48
}
49
}
50
fragment InputValue on __InputValue {
51
name
52
description
53
type { ...TypeRef }
54
defaultValue
55
}
56
fragment TypeRef on __Type {
57
kind
58
name
59
ofType {
60
kind
61
name
62
ofType {
63
kind
64
name
65
ofType {
66
kind
67
name
68
ofType {
69
kind
70
name
71
ofType {
72
kind
73
name
74
ofType {
75
kind
76
name
77
ofType {
78
kind
79
name
80
}
81
}
82
}
83
}
84
}
85
}
86
}
87
}
Copied!