You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/visibility.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Visibility
2
2
3
-
Visibility controls can hide parts of a supergraph from select audiences without compromising stitching operations. Restricted schema elements are hidden from introspection and validate as though they do not exist (which is different from traditional authorization where an element is acknowledged as restricted). Visibility is useful for managing multiple distributions of a schema for different audiences.
3
+
Visibility controls can hide parts of a supergraph from select audiences without compromising stitching operations. Restricted schema elements are hidden from introspection and validate as though they do not exist (which is different from traditional authorization where an element is acknowledged as restricted). Visibility is useful for managing multiple distributions of a schema for different audiences, and provides a flexible analog to Apollo Federation's `@inaccessible` rule.
4
4
5
-
Under the hood, this system wraps `GraphQL::Schema::Visibility`(with nil profile support) and requires at least GraphQL Ruby v2.5.3.
5
+
Under the hood, this system wraps [GraphQL visibility](https://graphql-ruby.org/authorization/visibility) (specifically, the newer `GraphQL::Schema::Visibility` with nil profile support) and requires at least GraphQL Ruby v2.5.3.
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:
64
+
The client can then execute requests with a `visibility_profile` parameter in context that specifies one of these names:
65
65
66
66
```ruby
67
67
query =%|{
@@ -84,7 +84,7 @@ The `visibility_profile` parameter will select which visibility distribution to
84
84
- Using `visibility_profile: "private"` will accesses the `msrp` field as usual.
85
85
- Providing no profile parameter (or `visibility_profile: nil`) will access the entire graph without any visibility constraints.
86
86
87
-
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.
87
+
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 use by the stitching implementation.
0 commit comments