Skip to content

Do not prompt for confirmation for GraphQL queries without a mutation #39

@gr2m

Description

@gr2m

Sending a GraphQL query is currently a POST /graphql request, so even if the query does not perform any mutation, the CLI is prompting the user to confirm the request

? Do you want to allow the following request:

  <unknown endpoint>
  route:     POST /graphql
  query:     query($htmlUrl: URI!) {
      resource(url: $htmlUrl) {
        ... on PullRequest {
          state
          author {
            login
          }
          files(first:2) {
            nodes {
              path
            }
          }
          commits(last: 1) {
            nodes {
              commit {
                oid
                checkSuites(first: 100) {
                  nodes {
                    checkRuns(first: 100) {
                      nodes {
                        name
                        conclusion
                        permalink
                      }
                    }
                  }
                }
                status {
                  state
                  contexts {
                    state
                    targetUrl
                    description
                    context
                  }
                }
              }
            }
          }
        }
      }
    }
  variables: [object Object]
 … 
❯ yes
  no
  yes, for all "POST /graphql" requests
  yes, for all requests

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions