-
Notifications
You must be signed in to change notification settings - Fork 29
/
V1_graphql_raw.yml
120 lines (120 loc) · 4.14 KB
/
V1_graphql_raw.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
swagger: '2.0'
info:
x-copyright: 'Copyright IBM Corp. 2017'
title: GraphQL
description: ""
version: "1.0.0"
host: api.watsonwork.ibm.com
schemes:
- https
definitions:
GraphQLQuery:
type: object
description: "GraphQL Query to be executed"
GraphQLResponse:
type: object
properties:
data:
type: object
errors:
type: array
items:
$ref: '#/definitions/GraphQLError'
GraphQLError:
type: object
properties:
message:
type: string
description: Message explaining why did the field failed to be resolved
field:
type: object
properties:
name:
description: Name of the field that produced the error
type: string
type:
description: Type of error
type: string
HttpError:
type: object
description: "Additional information for an error when a GraphQL query could not be processed"
properties:
status:
type: integer
description: HTTP Status Code of the error
message:
type: string
description: Description of the error
parameters:
Authorization:
name: Authorization
in: header
type: string
description: "Authorization header, in form of `Bearer {access_token}` where `{access_token}` is a JWT token"
required: true
RequestId:
name: X-RequestId
in: header
type: string
description: "Optional header to be able to replay requests in an idempotent way"
required: false
paths:
/graphql:
get:
summary: GraphiQL schema exploration tool
description: GraphiQL tool that allows to navigate the GraphQL schema, command completion to build GraphQL queries and query execution
produces:
- text/html
parameters:
- name: query
in: query
description: The query to be executed
required: false
type: string
responses:
'200':
description: GraphiQL HTML Tool
post:
summary: This endpoint allows to execute a GraphQL query
description: This endpoint allows to execute a GraphQL query
consumes:
- application/graphql
produces:
- application/json
parameters:
- name: Authorization
$ref: '#/parameters/Authorization'
- name: X-RequestId
$ref: '#/parameters/RequestId'
- name: query
in: body
description: Raw graphql query to be executed. The query is mandatory, but it can be as a url parameter or in the body.
required: false
schema:
$ref: '#/definitions/GraphQLQuery'
- name: query
in: query
description: The query to be executed. The query is mandatory, but it can be as a url parameter or in the body.
required: false
type: string
- name: variables
in: query
description: The variables to be used with the query.
required: false
type: array
items:
type: string
- name: operationName
in: query
description: The name of the operation
required: false
type: string
responses:
'200':
description: "Response of the execution of the GraphQL query"
schema:
$ref: '#/definitions/GraphQLResponse'
'400':
description: "Additional information on a field in the GraphQL query that failed to be resolved"
schema:
$ref: '#/definitions/HttpError'