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

Combine @is and @provides #28

Closed
wants to merge 1 commit into from
Closed

Combine @is and @provides #28

wants to merge 1 commit into from

Conversation

smyrick
Copy link

@smyrick smyrick commented Apr 5, 2024

These two directives are functionally doing the same thing we just limit them to different use cases with the directive locations.

They both tell the query planner that if you go through this path some of the data you will get back can be sourced either from an argument or it will be provided by the subgraph

I am open for discussion of not merging them. But at second glance they do seem very similar. It also helps with the short and unclear name of @is

These two directives are functionally doing the same thing we just limit them to different use cases with the directive locations.

They both tell the query planner that if you go through this path some of the data you will get back can be sourced either from an argument or it will be provided by the subgraph

I am open for discussion of not merging them. But at second glance they do seem very similar. It also helps with the short and unclear name of `@is`
@michaelstaib
Copy link
Member

I think this looks great and would reduce cognitive complexity.

@dariuszkuc
Copy link

I don't think those two directives should be merged

  • @provides is a query planner optimization, it means that some fields through some specific paths can be resolved locally so we don't have to jump to other subgraphs to get this data
  • @is is a composition directive to mark two fields as equivalent (so they could be merged as one into the supergraph or args can be mapped to fields)

@michaelstaib
Copy link
Member

@dariuszkuc we discussed it in the wg last week and came to the same conclusion. I am closing this PR

@smyrick smyrick deleted the patch-1 branch April 17, 2024 23:14
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.

3 participants