Add integration with GraphQL#134
Add integration with GraphQL#134morsh merged 7 commits intoAzure:ibex-version-1.0from c-w:graphql-datasource
Conversation
|
@c-w not sure if this should be approved prior event hub. Plus, add this sample (minus the connection string) to the dashboard samples once you added event hub integration and add html instructions how to add the connection string (under connection => editor) |
src/data-sources/plugins/GraphQL.ts
Outdated
| } | ||
|
|
||
| const params = this.getParams(); | ||
| const query = params.query; |
There was a problem hiding this comment.
const params = this.getParams() || {};
const { query } = params || {};
There was a problem hiding this comment.
The suggested code doesn't compile, but I managed to add default values in 4dcbd0e.
|
|
||
| updateSelectedValues(dependencies: IDictionary, selectedValues: any) { | ||
| if (Array.isArray(selectedValues)) { | ||
| return Object.assign(dependencies, { 'selectedValues': selectedValues }); |
There was a problem hiding this comment.
I find that using lodash is more readable, especially if you have it in your project. But that is just a recommendation, not a must. Plus, you can use a simpler form of assign to property:
Object.assign(dependencies, { selectedValues });
This pull request adds a connection and data-source for GraphQL.
To test the integration, place the following content into a file called
graphql.private.jsin theserver/dashboardsfolder:Open the thus-defined dashboard to fetch the name for a Pokemon from the GraphQL PokeAPI and display it in an Ibex table: