Skip to content

Commit e9d3b36

Browse files
authored
Update visibility.md
1 parent 8698a19 commit e9d3b36

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/visibility.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type Query {
4141
}
4242
```
4343

44-
When composing a stitching client, the names of all possible visibility profiles that the supergraph responds to should be specified in composer options:
44+
When composing a stitching client, the names of all possible visibility profiles that the supergraph should respond to must be specified in composer options:
4545

4646
```ruby
4747
client = GraphQL::Stitching::Client.new(
@@ -61,28 +61,28 @@ client = GraphQL::Stitching::Client.new(
6161
)
6262
```
6363

64-
The client can then execute requests with a `visibility_profile` parameter in context that specifies the name of any profile the supergraph was composed with, or nil:
64+
The client can then execute requests with a `visibility_profile` parameter in context that specifies the name of any profile the supergraph was composed with:
6565

6666
```ruby
6767
query = %|{
6868
featuredProduct {
6969
title # always visible
7070
price # always visible
71-
msrp # only visible to internal and nil profiles
72-
id # only visible to nil profile
71+
msrp # only visible to "private" or without profile
72+
id # only visible without profile
7373
}
7474
}|
7575

7676
result = client.execute(query, context: {
77-
visibility_profile: "public", # << or private, or nil
77+
visibility_profile: "public", # << or "private"
7878
})
7979
```
8080

8181
The `visibility_profile` parameter will select which visibility distribution to use while introspecting and validating the request. For example:
8282

8383
- Using `visibility_profile: "public"` will say the `msrp` field does not exist (because it is restricted to "private").
8484
- Using `visibility_profile: "private"` will accesses the `msrp` field as usual.
85-
- Using `visibility_profile: nil` will access the entire graph without any visibility constraints.
85+
- Providing no profile parameter (or `visibility_profile: nil`) will access the entire graph without any visibility constraints.
8686

8787
The full potential of visibility comes when hiding stitching implementation details, such as the `id` field (which is the stitching key for the Product type). While the `id` field is hidden from all named profiles, it remains operational for the stitching implementation.
8888

@@ -105,7 +105,7 @@ end
105105

106106
## Merging visibilities
107107

108-
Visibility directives merge across schemas into the narrowest constraint possible. Profile sets for an element will intersect into its supergraph constraint:
108+
Visibility directives merge across schemas into the narrowest constraint possible. Profiles for an element will intersect into its merged supergraph constraint:
109109

110110
```graphql
111111
# location 1

0 commit comments

Comments
 (0)