We have tried upgrading graphql-server from 3.0.0b7 to 3.0.0 before. See GNS-Science/nshm-model-graphql-api#41 and GNS-Science/nshm-model-graphql-api#43 ("Weka does not get any data, and GraphiQL does not load")
We have tried this again 53763d5 but it seems the error is not fixed yet.
Also note that the project's releases page has no releases past 3.0.0b7 and someone suspecting it might be a supply chain attack graphql-python/graphql-server#135 (comment)
There is a fix for GraphiQL, but the maintainer seems to ignore anything that's going on graphql-python/graphql-server#138
- When receiving the
about query, the server correctly returns
{"data": {"about": "Hello World, I am solvis_graphql_api! Version: 0.9.2"}}
- When trying to reach
GraphiQL, for example at http://localhost:5000/graphql, we get a Javascript error caused by an obviously erroneously generated script:
root.render(
React.createElement(GraphiQL, {
fetcher: fetcher,
defaultEditorToolsVisibility: true,
plugins: [explorerPlugin],
inputValueDeprecation: true,
query: None,
variables: None,
headers: parameters.headers,
operationName: ,
defaultQuery: EXAMPLE_QUERY,
onEditQuery: onEditQuery,
onEditVariables: onEditVariables,
onEditHeaders: onEditHeaders,
onEditOperationName: onEditOperationName,
}),
);
Here is an example of this piece of code for a different API:
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: graphQLFetcher,
onEditQuery: onEditQuery,
onEditVariables: onEditVariables,
onEditHeaders: onEditHeaders,
onEditOperationName: onEditOperationName,
query: "# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a \"{\" character. Lines that start\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: \"value\") {\n# subField\n# }\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify query: Shift-Ctrl-P (or press the prettify button)\n#\n# Merge fragments: Shift-Ctrl-M (or press the merge button)\n#\n# Run Query: Ctrl-Enter (or press the play button)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#\n\n",
response: "{\n \"errors\": [\n {\n \"message\": \"Syntax Error: Unexpected <EOF>.\",\n \"locations\": [\n {\n \"line\": 31,\n \"column\": 1\n }\n ]\n }\n ]\n}",
variables: null,
headers: "",
operationName: null,
defaultQuery: "",
isHeadersEditorEnabled: true,
shouldPersistHeaders: false
}),
document.getElementById('graphiql')
);
I have not checked if weta would get any data. I'm reverting the change for now and leave it to a later date.
We have tried upgrading
graphql-serverfrom3.0.0b7to3.0.0before. See GNS-Science/nshm-model-graphql-api#41 and GNS-Science/nshm-model-graphql-api#43 ("Weka does not get any data, and GraphiQL does not load")We have tried this again 53763d5 but it seems the error is not fixed yet.
Also note that the project's releases page has no releases past
3.0.0b7and someone suspecting it might be a supply chain attack graphql-python/graphql-server#135 (comment)There is a fix for GraphiQL, but the maintainer seems to ignore anything that's going on graphql-python/graphql-server#138
aboutquery, the server correctly returnsGraphiQL, for example athttp://localhost:5000/graphql, we get a Javascript error caused by an obviously erroneously generated script:Here is an example of this piece of code for a different API:
I have not checked if
wetawould get any data. I'm reverting the change for now and leave it to a later date.