-
Notifications
You must be signed in to change notification settings - Fork 4
docs: added docs on how test graphql queries #1034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be being too picky
NatLeung96
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
securely
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| suite | |
| title |
| edges { | ||
| node { | ||
| name | ||
| maintainer<F6> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| maintainer<F6> | |
| maintainer |
|
|
||
| ``` | ||
| query WorkflowTemplates { | ||
| workflowTemplates(limit: 4) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does general graph-QL documentation and tips belong here? Or is it better somewhere else like the Dev Portal?
No description provided.