forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphql-interface.html
35 lines (32 loc) · 1.06 KB
/
graphql-interface.html
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
<div>
<div>
<h2 id="{{ item.id }}">
<a href="#{{ item.id }}" class="doctocat-link">{% include doctocat-link-icon %}</a>
{{- item.name -}}
</h2>
{{ item.description }}
</div>
<div>
{% include graphql-preview %}
{% include graphql-deprecation %}
<!-- Calculate and render "Implemented By" section -->
<!-- TODO instead of calculating in layout, better to calculate in graphql-data? -->
<h4>{% data ui.products.graphql.reference.implemented_by %}</h4>
<ul>
<!-- Loop over objects, then loop over object interfaces, and find a match -->
{% for object in graphql.schemaForCurrentVersion.objects %}
{% for interface in object.implements %}
{% if interface.name == item.name %}
<li>
<code><a href="/{{ currentLanguage }}{{ object.href }}">{{ object.name }}</a></code>
</li>
{% endif %} {% endfor %} {% endfor %}
</ul>
{% if item.fields %}
<h4>{% data ui.products.graphql.reference.fields %}</h4>
{% assign fields = item.fields %}
{% include graphql-fields %}
{% endif %}
</div>
<hr />
</div>