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

Introspection no longer uses collection pre and pos requests scripts #3861

Open
2 tasks done
allanmaral opened this issue Jan 22, 2025 · 1 comment
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@allanmaral
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

After version 1.37.0, Bruno stopped using collection script:pre-request and script:post-response scripts when introspecting the GraphQL schema.

This is specially critical for collections that rely on the pre-request scripts to set custom tokens or update the url.

It seems that the change that broke introspection was introduced in this commit: ee715a6

Or more specifically this change here: ee715a6 diff

.bru file to reproduce the bug

collection.bru

script:pre-request {
  console.log("1. Collection pre-request script...")
}

sample.bru

meta {
  name: Sample Request
  type: graphql
  seq: 2
}

post {
  url: https://graphql.org/graphql/
  body: graphql
  auth: none
}

body:graphql {
  query AllFilms {
    allFilms {
      films {
        title
      }
    }
  }
}

script:pre-request {
  console.log('2. Request pre-request script...')
}

Screenshots/Live demo link

Bruno 1.38.1

Image

Bruno 1.36.1

Image

@allanmaral allanmaral added the bug Something isn't working label Jan 22, 2025
@ganesh-bruno ganesh-bruno self-assigned this Jan 23, 2025
@ganesh-bruno
Copy link
Collaborator

Hey @allanmaral

Thanks for reporting this issue.

I was able to reproduce it, and we're working on it.
Thanks for sharing the video demo, it was helpful in reproducing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants