summaryrefslogtreecommitdiff
path: root/lib/gitlab/graphql/docs/templates/default.md.haml
blob: ec05294358975f1b7f8722bce9ef6f102a1ae2da (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
-# 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.

  CAUTION: **Caution:**
  Fields that are deprecated are marked with **{warning-solid}**.
\

:plain
  ## Object types

  Object types represent the resources that GitLab's 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)
    \