|
| 1 | +<section id="{{./htmlId}}" |
| 2 | + class="operation operation-{{#if isQuery}}query{{else if isMutation}}mutation{{else if isSubscription}}subscription{{else}}unknown{{/if}}" |
| 3 | + data-traverse-target="{{./htmlId}}"> |
| 4 | + {{# unless @first }} |
| 5 | + {{#if parentHtmlId }} |
| 6 | + <div class="operation-group-name"> |
| 7 | + <a href="#group-{{./parentHtmlId}}">{{./parentName}}</a> |
| 8 | + </div> |
| 9 | + {{/if}} |
| 10 | + {{/unless}} |
| 11 | + |
| 12 | + <h2 class="operation-heading {{#if (and isDeprecated (not @root.info.x-hideIsDeprecated)) }}operation-deprecated{{/if}}"> |
| 13 | + {{md (codify name) stripParagraph="true"}} |
| 14 | + </h2> |
| 15 | + |
| 16 | + {{#if (and deprecationReason (not @root.info.x-hideDeprecationReason))}} |
| 17 | + <div class="doc-row"> |
| 18 | + <div class="doc-copy"> |
| 19 | + <div class="doc-copy-section"> |
| 20 | + <div class="deprecation-reason"> |
| 21 | + {{ md deprecationReason stripParagraph=true }} |
| 22 | + </div> |
| 23 | + </div> |
| 24 | + </div> |
| 25 | + </div> |
| 26 | + {{/if}} |
| 27 | + |
| 28 | + {{#if description}} |
| 29 | + <div class="doc-row"> |
| 30 | + <div class="doc-copy"> |
| 31 | + <div class="operation-description doc-copy-section"> |
| 32 | + <h5>Description</h5> |
| 33 | + {{ md (interpolateReferences description) }} |
| 34 | + </div> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + {{/if}} |
| 38 | + |
| 39 | + <div class="doc-row"> |
| 40 | + <div class="doc-copy"> |
| 41 | + {{#if response}} |
| 42 | + <div class="operation-response doc-copy-section"> |
| 43 | + <h5>Response</h5> |
| 44 | + <p> |
| 45 | + Returns |
| 46 | + {{! If it's got items, then it's an array, and we don't care about the indefiniteArticle }} |
| 47 | + {{#unless response.isArray }} |
| 48 | + {{ indefiniteArticle response.underlyingType.name }} |
| 49 | + {{/unless}} |
| 50 | + {{~ md (mdTypeLink . codify=true) stripParagraph=true }} |
| 51 | + </p> |
| 52 | + </div> |
| 53 | + {{/if}} |
| 54 | + {{>graphql/_query-or-mutation-arguments}} |
| 55 | + </div> |
| 56 | + |
| 57 | + <div class="doc-examples"> |
| 58 | + {{#if (firstTruthy query mutation subscription)}} |
| 59 | + <h4 class="example-heading">Example</h4> |
| 60 | + |
| 61 | + <div class="example-section example-section-is-code operation-query-example"> |
| 62 | + <h5>Query</h5> |
| 63 | + {{printGraphQL (firstTruthy query mutation subscription)}} |
| 64 | + </div> |
| 65 | + |
| 66 | + {{#if variables}} |
| 67 | + <div class="example-section example-section-is-code operation-variables-example"> |
| 68 | + <h5>Variables</h5> |
| 69 | + {{printJSON variables}} |
| 70 | + </div> |
| 71 | + {{/if}} |
| 72 | + {{#if response.data}} |
| 73 | + <div class="example-section example-section-is-code operation-response-example"> |
| 74 | + <h5>Response</h5> |
| 75 | + {{printJSON response.data}} |
| 76 | + </div> |
| 77 | + {{/if}} |
| 78 | + {{/if}} |
| 79 | + </div> |
| 80 | + <a href="#top">back to top</a> |
| 81 | + </div> |
| 82 | +</section> |
0 commit comments