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

semantic analysis: validate operation Fragment and its Type Condition in Document #150

Closed
Tracked by #147
lrlna opened this issue Jan 25, 2022 · 1 comment
Closed
Tracked by #147
Assignees
Labels
apollo-compiler issues/PRs pertaining to semantic analysis & validation

Comments

@lrlna
Copy link
Member

lrlna commented Jan 25, 2022

Description

Validate the operation definition and add related methods to the SourceDatabase.

Related Issues, #144, #147

Specification

Validation

  • Documentation in spec

1. fragment can only be specified on an object type, interface and union

Hints

  1. Show on which other type a fragment is specified and its location in the current document
Additions to Source Database
  1. all object types → Vec<ObjectTypeDefinition>
  2. all interfaces → Vec<InterfaceTypeDefinition>
  3. all unions → Vec<UnionTypeDefinition>
  4. all fragments in a given operation definition → Vec<FragmentNames>

2. the object type, interface or union that the fragment is specified on must be defined

Additions to Source Database
  1. all object types → Vec<ObjectTypeDefinition>
  2. all interfaces → Vec<InterfaceTypeDefinition>
  3. all unions → Vec<UnionTypeDefinition>
@lrlna lrlna self-assigned this Jan 25, 2022
@lrlna lrlna added the apollo-compiler issues/PRs pertaining to semantic analysis & validation label Jan 25, 2022
@lrlna lrlna changed the title Fragment and its Type Condition semantic analysis: validate operation Fragment and its Type Condition in Document Jan 25, 2022
@lrlna
Copy link
Member Author

lrlna commented Feb 15, 2023

closing in favour of #310 and #309. they are both clearer than this issue

@lrlna lrlna closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apollo-compiler issues/PRs pertaining to semantic analysis & validation
Projects
None yet
Development

No branches or pull requests

1 participant