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

test: add tests for queries with fragment and alias #22

Merged
merged 1 commit into from
May 31, 2022

Conversation

krisgrint
Copy link
Contributor

@krisgrint krisgrint commented May 25, 2022

Closes #11

This PR adds tests which check if queries with fragments or aliases are forwarded correctly to the target service from the created federated service.

Queries with fragments work as expected.

Aliasing the query works as expected, as does aliasing results when using the same query more than once.

Aliasing fields in response to the query is not supported out of the box - a new issue has been created to track implementation of this #26

Also renames test/build-federated-info.test.js so that it is picked up by the test runner

@krisgrint krisgrint force-pushed the test/11-add-tests-for-fragment-and-alias branch 3 times, most recently from c03fc12 to a393d3d Compare May 27, 2022 16:03
@krisgrint
Copy link
Contributor Author

krisgrint commented May 27, 2022

Hi @simone-sanfratello any thoughts on whether we need to support aliasing on the fields? Thanks

@simone-sanfratello
Copy link
Contributor

If they are not supported out-of-the-box, it's not trivial to implement

What I'd do is to check on the gateway the "stuff" is been sent and send the required info, then here forward or handle again

@krisgrint krisgrint force-pushed the test/11-add-tests-for-fragment-and-alias branch from a393d3d to 9789987 Compare May 30, 2022 09:26
@krisgrint krisgrint marked this pull request as ready for review May 30, 2022 09:29
@krisgrint krisgrint force-pushed the test/11-add-tests-for-fragment-and-alias branch from 9789987 to 69e948f Compare May 30, 2022 10:23
@simoneb simoneb merged commit c7e46d1 into master May 31, 2022
@simoneb simoneb deleted the test/11-add-tests-for-fragment-and-alias branch May 31, 2022 08:22
@github-actions github-actions bot mentioned this pull request May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for fragments and aliases
3 participants