Skip to content

Add name for each query and mutation in Hub Go client#378

Merged
mszostok merged 2 commits intocapactio:mainfrom
mszostok:fix-gql-cli
Jun 29, 2021
Merged

Add name for each query and mutation in Hub Go client#378
mszostok merged 2 commits intocapactio:mainfrom
mszostok:fix-gql-cli

Conversation

@mszostok
Copy link
Copy Markdown
Collaborator

Description

After bumping graphql-js dependency, the e2e tests are failing. After debugging, I detected that for all unnamed queries/mutations, the GraphQL API returns 400 status code. Unfortunately, I cannot detect how our CI on PR didn't detect that.

Changes proposed in this pull request:

  • Add name for each query and mutation in Hub Go client

@mszostok mszostok added bug Something isn't working area/hub Relates to Hub labels Jun 29, 2021
@mszostok mszostok added this to the 0.4.0 milestone Jun 29, 2021
@pkosiec
Copy link
Copy Markdown
Collaborator

pkosiec commented Jun 29, 2021

This is OK change, I was able to confirm the issue on our stage cluster. The response in GraphQL Playground is terrible:

query {
  interfaces {
    path
  }
}

results in:

{
  "data": {},
  "errors": [
    {} // empty error!
  ]
}

and

query Interfaces {
  interfaces {
    path
  }
}

in:

{
  "data": {
    "interfaces": [
      {
        "path": "cap.core.interface.runner.generic.run"
      },
      {
// (...)

IMHO we should handle the issue #334 really soon.

Also, on this PR I noticed another, very similar fail on integration tests:

  Timed out after 300.001s.
  Error: Unexpected non-nil/non-zero extra argument at index 1:
  	<*errors.withStack>: while executing query to fetch Hub Implementation: All attempts fail:
  #1: graphql: 

Another time empty error from GraphQL... I think we should spend more time on debugging this in a dedicated issue.

@mszostok mszostok merged commit 5570a5d into capactio:main Jun 29, 2021
@mszostok mszostok deleted the fix-gql-cli branch June 29, 2021 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/hub Relates to Hub bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants