Skip to content

Fix that projects without content are at times served the wrong GraphQL content #28

@tanius

Description

@tanius

output.txt
This issue happens only for projects that contain no content. Sometimes but not always, the request for the Graphql content ("POST http://graphryder.edgeryders.eu/graphql") will result in way too much content (57 MiB in my test, while expecting a few hundred bytes). In the browser, the symptom will that (1) it takes a very long time to load the dashboard and (2) eventually the dashboard will not appear but an error message like this:

Graph.addNode: the "user_8" node already exist in the graph.

Those 57 MiB of GraphQL content could possibly contain everything stored in the Graphryder Neo4J database. I have a local copy of such a 57 MiB reply and here are the first 60 kiB of that reply. In addition, this is the cUrl equivalent of the request that resulted in this 57 MiB reply:

curl 'http://graphryder.edgeryders.eu/graphql' \
  -X POST \
  -H 'content-type: application/json' \
  -H 'Origin: http://graphryder.edgeryders.eu' \
  -H 'Connection: keep-alive' \
  --data-raw '{"operationName":"getGraphByProject","variables":{"platform":"trustinplay","project":"A Town by the Sea (NOT IN USE)"},"query":"query getGraphByProject($platform: String!, $project: String!) {\n  graph: getGraphByProject(platform: $platform, project: $project) {\n    attributes\n    nodes {\n      key\n      attributes\n      __typename\n    }\n    edges {\n      key\n      source\n      target\n      attributes\n      __typename\n    }\n    __typename\n  }\n}\n"}' \
  > graphl.txt

This issue is connected with issue #25 in that both affect projects without content, but they are caused by different pieces of code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions