Skip to content

Commit

Permalink
Added some explanatory text to the subgraph chapter. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib authored Jan 23, 2024
1 parent 4d08d2f commit ee832cc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions spec/Section 2 -- Subgraph.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Subgraph

The GraphQL Composite Schemas spec refers to downstream GraphQL APIs that have
been designed for composition as subgraphs. These subgraphs may have additional
directives specified in this section to indicate semantics of type system
members in the overall graph.

## Directives

Composition directives offer instructions for the schema composition process,
Subgraph directives offer instructions for the schema composition process,
detailing type system member semantics and specifying type transformations. In
many cases subgraph schemas can be composed without any directives.
some cases subgraph schemas can be composed without any directives.

### @entityResolver

Expand All @@ -14,7 +19,7 @@ directive @entityResolver on FIELD_DEFINITION

Entity resolvers are fields on the query root type of a subgraph that can
resolve an entity by a stable key. The stable key is defined by the arguments of
the entity resolver field.
the field.

```graphql example
extend type Query {
Expand All @@ -23,7 +28,7 @@ extend type Query {
}

extend type Person {
id: ID!
id: ID! # matches the argument of personById
}
```

Expand Down

0 comments on commit ee832cc

Please sign in to comment.