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: cli/protoc-gen-grafbase-subgraph/CHANGELOG.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,17 @@
2
2
3
3
### Added
4
4
5
+
-**Input argument directives** added. You can now add GraphQL directives to RPC method input arguments using the `input_argument_directives` option on methods.
6
+
7
+
-**Composite schema entity references with @derive** added. You can now create federation-style entity references using the `derive` option on messages:
8
+
- Use `option (grafbase.graphql.derive) = {entity: "User", is: "{ id: user_id }"};` on fields
9
+
- Automatically generates reference fields with `@derive` and `@is` directives
10
+
- Creates stub entity types with `@key` directives if the type is not already defined
11
+
- Supports custom relation field names with the `field` parameter
12
+
- The `is` parameter defines the field mapping using format `"{ <entity_key_field>: <proto_field> }"`
13
+
- The `@is` directive uses the value from the `is` parameter directly
14
+
- Enables cross-subgraph entity references in federated schemas
15
+
5
16
-**Multiple subgraphs support** added. Support for generating multiple GraphQL files based on service annotations:
6
17
7
18
- Services can now have a `subgraph_name` option that maps them to different subgraph files
- **Multi-file mode**: When using `subgraph_name`, only directives from services in that subgraph are included
134
134
- **Multiple directives**: You can include multiple directives in a single string, separated by spaces
135
135
136
+
### Composite schema entity references
137
+
138
+
You can create federation-style entity references using the `derive` option on message fields. This allows you to reference entities from other subgraphs:
### Mapping specific services to different subgraphs
137
200
138
201
Bydefault, theplugingeneratesasingle `schema.graphql` file containing all services. However, you can map different services to different subgraph files using the `subgraph_name` option:
0 commit comments