Welcome to mirror list, hosted at ThFree Co, Russian Federation.

default.md.haml « templates « docs « graphql « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 847f1777b086548f3123f6a77bb00f6016c764ce (plain)
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
-# haml-lint:disable UnnecessaryStringOutput

= auto_generated_comment

:plain
  # GraphQL API Resources

  This documentation is self-generated based on GitLab current GraphQL schema.

  The API can be explored interactively using the [GraphiQL IDE](../index.md#graphiql).

  Each table below documents a GraphQL type. Types match loosely to models, but not all
  fields and methods on a model are available via GraphQL.

  WARNING:
  Fields that are deprecated are marked with **{warning-solid}**.
  Items (fields, enums, etc) that have been removed according to our [deprecation process](../index.md#deprecation-and-removal-process) can be found
  in [Removed Items](../removed_items.md).

  <!-- vale gitlab.Spelling = NO -->
\

:plain
  ## `Query` type

  The `Query` type contains the API's top-level entry points for all executable queries.
\

- sorted_by_name(queries).each do |query|
  = render_name_and_description(query)
  \
  = render_return_type(query)
  - unless query[:arguments].empty?
    ~ "#### Arguments\n"
    ~ "| Name | Type | Description |"
    ~ "| ---- | ---- | ----------- |"
    - sorted_by_name(query[:arguments]).each do |argument|
      = render_field(argument)
    \

:plain
  ## Object types

  Object types represent the resources that the GitLab GraphQL API can return.
  They contain _fields_. Each field has its own type, which will either be one of the
  basic GraphQL [scalar types](https://graphql.org/learn/schema/#scalar-types)
  (e.g.: `String` or `Boolean`) or other object types.

  For more information, see
  [Object Types and Fields](https://graphql.org/learn/schema/#object-types-and-fields)
  on `graphql.org`.
\

- objects.each do |type|
  - unless type[:fields].empty?
    = render_name_and_description(type)
    \
    ~ "| Field | Type | Description |"
    ~ "| ----- | ---- | ----------- |"
    - sorted_by_name(type[:fields]).each do |field|
      = render_field(field)
    \

:plain
  ## Enumeration types

  Also called _Enums_, enumeration types are a special kind of scalar that
  is restricted to a particular set of allowed values.

  For more information, see
  [Enumeration Types](https://graphql.org/learn/schema/#enumeration-types)
  on `graphql.org`.
\

- enums.each do |enum|
  - unless enum[:values].empty?
    = render_name_and_description(enum)
    \
    ~ "| Value | Description |"
    ~ "| ----- | ----------- |"
    - sorted_by_name(enum[:values]).each do |value|
      = render_enum_value(value)
    \

:plain
  ## Scalar types

  Scalar values are atomic values, and do not have fields of their own.
  Basic scalars include strings, boolean values, and numbers. This schema also
  defines various custom scalar values, such as types for times and dates.

  This schema includes custom scalar types for identifiers, with a specific type for
  each kind of object.

  For more information, read about [Scalar Types](https://graphql.org/learn/schema/#scalar-types) on `graphql.org`.
\

- graphql_scalar_types.each do |type|
  = render_name_and_description(type)
  \

:plain
  ## Abstract types

  Abstract types (unions and interfaces) are ways the schema can represent
  values that may be one of several concrete types.

  - A [`Union`](https://graphql.org/learn/schema/#union-types) is a set of possible types.
    The types might not have any fields in common.
  - An [`Interface`](https://graphql.org/learn/schema/#interfaces) is a defined set of fields.
    Types may `implement` an interface, which
    guarantees that they have all the fields in the set. A type may implement more than
    one interface.

  See the [GraphQL documentation](https://graphql.org/learn/) for more information on using
  abstract types.
\

:plain
  ### Unions
\

- graphql_union_types.each do |type|
  = render_name_and_description(type, 4)
  \
  One of:
  \
  - type[:possible_types].each do |type_name|
    ~ "- [`#{type_name}`](##{type_name.downcase})"
  \

:plain
  ### Interfaces
\

- graphql_interface_types.each do |type|
  = render_name_and_description(type, 4)
  \
  Implementations:
  \
  - type[:implemented_by].each do |type_name|
    ~ "- [`#{type_name}`](##{type_name.downcase})"
  \
  ~ "| Field | Type | Description |"
  ~ "| ----- | ---- | ----------- |"
  - sorted_by_name(type[:fields] + type[:connections]).each do |field|
    = render_field(field)
  \