---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Workday Graph API, Graph API, GraphQL]
nav: wcp_docs
parent_url: /wcp_docs/
title: Generate Queries on Graph API Explorer
layout: subsection
---

### Prerequisites

<a id="prereq_N1005C_N10059_N10001"></a>
Ensure that you've configured security policies for the domains that control access to the business objects in the query or mutation you want to generate. The field descriptions in the Graph API schema documentation list the required security domains.

### Context

<a id="context_N10063_N10059_N10001"></a>
The <b>Generate Query</b> panel on the Graph API Explorer helps you build a query or mutation.

### Steps

1.  <a id="step_N10073_N10070_N10059_N10001x"></a>On the left sidebar of the Graph API Explorer, click the <b>Show Generate Query</b> icon.
2.  <a id="step_N10073_N10070_N10059_N10001"></a>On the <b>Filter Fields</b> box, type the query or mutation.
3.  <a id="step_N100A7_N10070_N10059_N10001"></a>Select any of these options:

<table><thead><tr><th>    Option</th><th>    Description</th></tr></thead><tbody><tr><td><b>Generated Depth</b></td><td>Adds field levels up to the specified number.</td></tr><tr><td><b>Show Only Required Input Fields</b></td><td>By default, a generated mutation includes all input fields. A generated query includes the optional <code>where</code>, <code>limit</code>, <code>offset</code>, and <code>orderBy</code> fields. <p>If you select <b>Show Only Required Fields</b>, the generated query or mutation includes only the required input fields.</p></td></tr><tr><td><b>Include Variables in Query</b></td><td>By default, the generated query or mutation uses a variable for each argument. Note that query variables begin with <b>$</b>. Query variables are useful for sending dynamic data to the query arguments. The Query panel displays all variables in the <b>Variables</b> section. <p>If you select <b>Include Variables in Query</b>, the generated query replaces all $ variables inside the query with their corresponding fields and placeholder values.</p> <p>This option embeds the argument fields inside the query or mutation. You can select this option for simpler queries or if you don't need to use query variables.</p></td></tr></tbody></table><br/>

4.  <a id="step_N10111_N10070_N10059_N10001"></a>Click a query or mutation from the filtered list.


### Result

<a id="result_N10118_N10059_N10001"></a>
The Query panel displays the generated query or mutation.

If you change a query generation option, click the query or mutation from the filtered list to regenerate. The Query panel displays the generated query or mutation in a new tab.

### Next Steps

<a id="postreq_N10123_N10059_N10001"></a>
1.  Refine the query or mutation. Remove unnecessary fields, and replace the placeholder values.
2.  Test the query or mutation by clicking the <b>Execute query</b> icon on the Query panel. Alternatively, press <b>Ctrl+Enter</b>.
3.  If the query or mutation is successful, copy it to your Extend app.

    To copy a multi-line query string to a PMD endpoint, click <b>Copy Query.</b>

    To copy a single-line JSON map containing the query and variables, click <b>Copy JSON</b>.



### Related Information

[Graph API Queries](/wcp_docs/qxq1671067079349.html)

[Graph API Mutations](/wcp_docs/kbu1671067116723.html)

