Skip to content

Commit

Permalink
more README fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gmac committed May 11, 2024
1 parent 5eb170b commit a7c89c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ type Query {

#### Multiple query arguments

Stitching infers which argument to use for queries with a single argument, or when the key name matches its intended argument. For queries that accept multiple arguments with unmatched names, the key should provide an argument mapping specified as `"<arg>:<key>"`.
Stitching infers which argument to use for queries with a single argument, or when the key name matches its intended argument. For queries that accept multiple arguments with unmatched names, the key should provide an argument alias specified as `"<arg>:<key>"`.

```graphql
type Product {
id: ID!
}
type Query {
product(by_id: ID, by_sku: ID): Product @stitch(key: "by_id:id")
product(byId: ID, bySku: ID): Product @stitch(key: "byId:id")
}
```

Expand Down Expand Up @@ -294,7 +294,7 @@ sdl_string = <<~GRAPHQL
}
type Query {
productById(id: ID!): Product
productByUpc(sku: ID!): Product
productBySku(sku: ID!): Product
}
GRAPHQL

Expand All @@ -304,7 +304,7 @@ supergraph = GraphQL::Stitching::Composer.new.perform({
executable: ->() { ... },
stitch: [
{ field_name: "productById", key: "id" },
{ field_name: "productByUpc", key: "sku" },
{ field_name: "productBySku", key: "sku" },
]
},
# ...
Expand Down

0 comments on commit a7c89c0

Please sign in to comment.