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

fix: bug with graphql nested queries #3089

Conversation

MedHeikelBouzayene
Copy link
Contributor

Summary:
There is a bug when sending a nested query to a graphql server. The bug is described with an example in the issue created.

Issue Reference(s):
Fixes #3088

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • I have performed a self-review of my code.
  • PR follows the naming convention of <type>(<optional scope>): <title>

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Oct 30, 2024
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 91.01124% with 8 lines in your changes missing coverage. Please review.

Project coverage is 86.88%. Comparing base (fb0974d) to head (2a594d1).
Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
src/core/blueprint/operators/graphql.rs 86.44% 8 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3089   +/-   ##
=======================================
  Coverage   86.87%   86.88%           
=======================================
  Files         276      276           
  Lines       26873    26923   +50     
=======================================
+ Hits        23347    23391   +44     
- Misses       3526     3532    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

) -> RelatedFields {
type_names: VecDeque<String>,
visited: &mut HashSet<VecDeque<String>>,
) -> Option<RelatedFields> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
) -> Option<RelatedFields> {
) -> Valid<RelatedFields, String> {

)
.map_err(|e| ValidationError::new(e.to_string())),
)
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation needs to be changed. The related field information can't be inferred while creating a blueprint. It should be implemented as a part of the JIT transformation step. The JIT Transformations should identify exactly what the RequestTemplate should look like for each query and then while evaluating we should simply use that operation and execute the GraphQL request.

@tusharmath tusharmath marked this pull request as draft November 2, 2024 10:23
@tusharmath
Copy link
Contributor

Moving to draft to reduce noise and improve CI efficiency. Once you are ready just mark it as "ready to review". Feel free to give a shoutout on the #contributors channel on Discord if you want immediate attention.

Copy link

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Nov 17, 2024
Copy link

PR closed after 10 days of inactivity.

@github-actions github-actions bot closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. type: fix Iterations on existing features or infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in the nested queries when working with @graphql
3 participants