|
| 1 | +--- |
| 2 | +title: GraphQLDataSource Wizard |
| 3 | +page_title: GraphQLDataSource Wizard Tutorial |
| 4 | +description: "Learn how to connect your GraphQL endpoints to Telerik reports through the Web Report Designer's dedicated wizard." |
| 5 | +slug: telerikreporting/designing-reports/report-designer-tools/web-report-designer/tools/graphqldatasource-wizard |
| 6 | +tags: graphqldatasource,wizard |
| 7 | +published: True |
| 8 | +position: 5 |
| 9 | +--- |
| 10 | +<style> |
| 11 | +table th:first-of-type { |
| 12 | + width: 25%; |
| 13 | +} |
| 14 | +table th:nth-of-type(2) { |
| 15 | + width: 75%; |
| 16 | +} |
| 17 | +</style> |
| 18 | + |
| 19 | +# GraphQLDataSource Wizard Overview |
| 20 | + |
| 21 | +The GraphQLDataSource Wizard allows you to create new or edit existing [GraphQLDataSource components]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/graphqldatasource-component/overview%}) in the [Telerik Web Report Designer]({%slug telerikreporting/designing-reports/report-designer-tools/web-report-designer/overview%}). |
| 22 | + |
| 23 | +## Wizard Flow Summary |
| 24 | + |
| 25 | +| Authentication Type | Steps Displayed | |
| 26 | +|---------------------|-----------------| |
| 27 | +| None | Data Retrieval → GraphQL Query → Request Parameters → Design-Time Data → Preview | |
| 28 | +| Basic | + Basic Authentication | |
| 29 | +| 2-Step | + 2-Step Authentication + 2-Step Auth Parameters | |
| 30 | + |
| 31 | +### Configure Data Retrieval: Part 1 |
| 32 | + |
| 33 | +Configure the HTTP request properties used to retrieve data from the GraphQL service. |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +| Setting | Description | |
| 38 | +| ------ | ------ | |
| 39 | +|Service URL|The URL the request is sent to. Returns the data from the GraphQL service.| |
| 40 | +|Authentication Type|The authentication type. Supported options are Basic and 2-Step authentication.| |
| 41 | +|Response Encoding|Data encoding. The default is UTF-8.| |
| 42 | + |
| 43 | +### Configure Data Retrieval: Part 2 |
| 44 | + |
| 45 | +Define the GraphQL query to be sent to the service. You can write a static query or use inline parameters to inject values dynamically. |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +### Configure Request Parameters |
| 50 | + |
| 51 | +Define parameters for the HTTP request. The supported types are Query, Header, Cookie, and Inline. The inline parameters are parameters that are used to replace parameter tokens (@param1) in the URL and the GraphQL Query fields with an expression result or static value. For more information about the different types of parameters, refer to [Using Parameters in the GraphQLDataSource]({%slug graphqldatasource-parameters%}). |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +### Configure Basic Authentication (Optional) |
| 56 | + |
| 57 | +> This step is skipped unless you choose `Basic` authentication in the first step of the wizard. |
| 58 | +
|
| 59 | +Enter the credentials for basic authentication. |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +| Setting | Description | |
| 64 | +| ------ | ------ | |
| 65 | +|Username|The username used to authenticate. Required.| |
| 66 | +|Password|The password used to authenticate.| |
| 67 | + |
| 68 | +### Configure 2-Step Authentication (Optional) |
| 69 | + |
| 70 | +>note This step is skipped unless you choose `2-Step` authentication in the first step of the wizard. |
| 71 | +
|
| 72 | +Set up the settings for the 2-step (Bearer) authentication. |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +| Setting | Description | |
| 77 | +| ------ | ------ | |
| 78 | +|Login URL|Returns the authentication token or session key. Required.| |
| 79 | +|Login Body|The body of the login HTTP request.| |
| 80 | +|Username|The username used to authenticate. Needed only if the Login URL uses Basic Authentication.| |
| 81 | +|Password|The password used to authenticate.| |
| 82 | +|Token Path|A regular expression to retrieve the authentication or session key from the response.| |
| 83 | +|Logout URL|Called if the resource features a lockout for too many sessions.| |
| 84 | +|Logout Body|The body of the logout HTTP request.| |
| 85 | + |
| 86 | +### Configure Authentication Parameters (Optional) |
| 87 | + |
| 88 | +>note This step is skipped unless you choose `2-Step` authentication in the first step of the wizard. |
| 89 | +
|
| 90 | +Specify parameters for the authentication HTTP request. The supported types are Query, Header, Cookie, and Inline, like in the [Configure Request Parameters step](#configure-request-parameters). |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +### Choose Design-Time Data |
| 95 | + |
| 96 | +Choose the source of design-time data (used, for example, to display available data source fields in the [Edit Expression dialog]({%slug telerikreporting/designing-reports/report-designer-tools/desktop-designers/tools/edit-expression-dialog%})). The available options are: |
| 97 | + |
| 98 | +* **Use real data while designing the report** – HTTP requests are sent to the GraphQL service during design time to retrieve the data. |
| 99 | +* **Upload JSON file** – Use an external JSON file for the data. The URI can be relative or absolute. |
| 100 | +* **Use JSON inline as hard-coded data while designing the report** - Use a hard-coded JSON string. |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | +>tip Use an external JSON file or hard-coded data if the GraphQLDataSource component relies on a token that needs to be updated dynamically through report parameters. Report parameters can be used only at runtime. |
| 105 | +
|
| 106 | +### Preview Data Source Results |
| 107 | + |
| 108 | +Preview the data returned based on the current configuration. Optionally, specify a JSONPath expression to filter the result. |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | +| Setting | Description | |
| 113 | +| ------ | ------ | |
| 114 | +|Data Selector|The [JSONPath](https://www.newtonsoft.com/json/help/html/QueryJsonSelectTokenJsonPath.htm) expression string used to query the data. For more information, refer to [How to Use JSONPath to filter JSON data]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/graphqldatasource-component/how-to-use-jsonpath-to-filter-json-data%}).| |
| 115 | + |
| 116 | +## See Also |
| 117 | + |
| 118 | +* [GraphQLDataSource Component Overview]({%slug graphqldatasource%}) |
| 119 | +* [Using JSONPath to Filter JSON data]({%slug graphqldatasource-filter-json-data%}) |
| 120 | +* [Using Parameters with GraphQLDataSource]({%slug graphqldatasource-parameters%}) |
0 commit comments