docs: added docs on how test graphql queries#1034
Conversation
cdee3f6 to
067acf8
Compare
docs/how-tos/run-graphql-query.md
Outdated
| ## Exploring the Schema | ||
|
|
||
| Click the *Docs* button (top-left) to browse the schema. | ||
| Alternatively, use Ctrl - Space inside the query editor to view available fields an options. |
There was a problem hiding this comment.
| Alternatively, use Ctrl - Space inside the query editor to view available fields an options. | |
| Alternatively, use Ctrl + Space inside the query editor to view available fields and options. |
There was a problem hiding this comment.
I might be being too picky
NatLeung96
left a comment
There was a problem hiding this comment.
Is it worth explaining how to correctly provide variables or is that dumbing things down too much?
docs/how-tos/run-graphql-query.md
Outdated
| ## Exploring the Schema | ||
|
|
||
| Click the *Docs* button (top-left) to browse the schema. | ||
| Alternatively, use Ctrl - Space inside the query editor to view available fields an options. |
There was a problem hiding this comment.
I might be being too picky
067acf8 to
beb8f83
Compare
would say that I can describe it, but how to write a query is a bit hard. |
beb8f83 to
eafc8b3
Compare
That would be helpful to add. |
|
|
||
| There are alternative clients that can be used such as [*Postman*.](https://www.postman.com/) | ||
| When configuring authorization for these tools: | ||
| - store any sensitive data (passwords, tokens) securley as variables |
| For more information on how to use the GraphQL Dashboard please have a look at the official | ||
| GraphiQL docs [here](https://github.com/graphql/graphiql) | ||
|
|
||
| ## Alternative Clients |
There was a problem hiding this comment.
I suggest removing this section
| @@ -0,0 +1,85 @@ | |||
| # How to Run A GraphQL Query | |||
|
|
|||
| This guide explains how to run a GRAPHQL query for workflows using the Workflows | |||
There was a problem hiding this comment.
| This guide explains how to run a GRAPHQL query for workflows using the Workflows | |
| This guide explains how to run a GraphQL query for workflows using the Workflows |
| ## The Dashboard | ||
|
|
||
| The Workflows Dashboard includes a built-in GraphiQL client for writing and testing queries against | ||
| the GRAPHQL endppoint. |
There was a problem hiding this comment.
| the GRAPHQL endppoint. | |
| the GraphQL endpoint. |
| The Workflows Dashboard includes a built-in GraphiQL client for writing and testing queries against | ||
| the GRAPHQL endppoint. | ||
|
|
||
| ### iGraphQL Client |
There was a problem hiding this comment.
GraphiQL?
|
|
||
| Click the *Docs* button (top-left) to browse the schema. | ||
| The schema gives you an overview of available variables and their required types and helps build | ||
| your query as a query, mutation or subscription. |
There was a problem hiding this comment.
| your query as a query, mutation or subscription. | |
| your query, mutation or subscription. |
| node { | ||
| name | ||
| maintainer<F6> | ||
| suite |
There was a problem hiding this comment.
| suite | |
| title |
| edges { | ||
| node { | ||
| name | ||
| maintainer<F6> |
There was a problem hiding this comment.
| maintainer<F6> | |
| maintainer |
|
|
||
| ``` | ||
| query WorkflowTemplates { | ||
| workflowTemplates(limit: 4) { |
There was a problem hiding this comment.
Would it make more sense here to return nodes from the query as that's how we're currently using it
|
|
||
| ### Obtaining a Token | ||
| Run the following command to get a token in with the correct client id. | ||
| Please take attention to which oidc-client-id you are using. |
There was a problem hiding this comment.
pay attention/ take care
|
|
||
| All queries require an *authentication token* in the request headers. | ||
|
|
||
| Add the following header: |
There was a problem hiding this comment.
Add a screenshot to show where the header goes.
| the GraphQL endpoint which is shown below. | ||
|
|
||
| ## Available Endpoints | ||
| [Production](https://workflows.diamond.ac.uk/graphql) |
There was a problem hiding this comment.
Is this user-facing documentation or internal documentation for Workflows developers?
Assuming that it is user-facing, should we be encouraging them to use the Workflows endpoints directly? Is it not better to encourage them to use the federated graph?
There was a problem hiding this comment.
Does general graph-QL documentation and tips belong here? Or is it better somewhere else like the Dev Portal?
No description provided.