Skip to content
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

ListInfras GraphQL query return infras.projectID field empty #4337

Closed
williamokano-dh opened this issue Dec 15, 2023 · 3 comments · Fixed by #4393
Closed

ListInfras GraphQL query return infras.projectID field empty #4337

williamokano-dh opened this issue Dec 15, 2023 · 3 comments · Fixed by #4393
Labels

Comments

@williamokano-dh
Copy link

williamokano-dh commented Dec 15, 2023

What happened:
When executing the following GraphQL query against the server, the field infras.projectID return an empty string "".

What you expected to happen:
The field should be populated.

Where can this issue be corrected? (optional)
Probably here https://github.com/litmuschaos/litmus/blob/master/chaoscenter/graphql/server/pkg/chaos_infrastructure/service.go#L665-L683

How to reproduce it (as minimally and precisely as possible):

  1. Install Litmus Chaos Center
  2. Create an environment
  3. Create an infra
  4. Execute the following query against the graphql server
query ListInfras($projectID: ID!, $request: ListInfraRequest!) {
    listInfras(projectID: $projectID, request: $request) {
        totalNoOfInfras
        infras {
            projectID,
            infraID
        }
    }
}
  1. Observe that the response comes empty for the aforementioned field
{
  "data": {
    "listInfras": {
      "totalNoOfInfras": 3,
      "infras": [
        {
          "projectID": "",
          "infraID": "bb976ecb-8f27-400c-8952-93cce038b864"
        },
        {
          "projectID": "",
          "infraID": "c5d1fa64-4032-459c-9115-71d9dc0ac39e"
        },
        {
          "projectID": "",
          "infraID": "b4cafc2c-d8e5-438e-82db-7779cef9a45c"
        }
      ]
    }
  }
}

Anything else we need to know?:
It's a minor bug as it's easily fixable from the client side as projectID is a mandatory field, but I would rather not have to have any post-query fixing.

@Saranya-jena
Copy link
Contributor

Hi @williamokano-dh , thanks for reporting this issue, would you like to contribute to this, or else we can take it up?

@williamokano-dh
Copy link
Author

I can work on it this weekend or the next one, but if you have someone from Litmus project to work on this already, it's fine by me.

@Nageshbansal
Copy link
Contributor

@Saranya-jena I'll take this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants