protoc-gen-grafbase-subgraph: release 0.3.0 #164
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Added
Multiple subgraphs support added. Support for generating multiple GraphQL files based on service annotations:
subgraph_nameoption that maps them to different subgraph filessubgraph_name, the tool automatically switches to multi-file mode<subgraph_name>.graphqlinstead of the defaultschema.graphqlsubgraph_namein multi-file mode are ignored without warningProto3 optional field support added. The generator now properly handles proto3 optional fields:
Type!) in GraphQL output typesType) in GraphQL output typesFEATURE_PROTO3_OPTIONALto work with proto3 files containing optional fieldsComposite schemas shortcuts added. New protobuf options for simplified composite schemas directives:
grafbase.graphql.keyoption generates@keydirectives on typesgrafbase.graphql.lookupoption generates@lookupdirective on RPC methodsgrafbase.graphql.argument_isoption on RPC methods generates@isdirective on the input argument - a shortcut forgrafbase.graphql.argument_directives = "@is(field: \"...\")"grafbase.graphql.join_fieldoption generates fields with@requireand@grpcMethoddirectives, with proper type resolutionInput argument directives added. You can now add GraphQL directives to RPC method input argument, that corresponds to the input of the RPC method, using the
grafbase.graphql.argument_directivesoption on methods.Composite schema entity references with @derive added. You can now create federation-style entity references using the
grafbase.graphql.derive_fieldoption on messages:option (grafbase.graphql.derive_field) = {entity: "User", is: "{ id: user_id }"};on fields@deriveand@isdirectives@keydirectives if the type is not already definednameparameter@isdirective uses the value from theisparameter directlyInput argument directives support added. You can now add GraphQL directives to RPC method input arguments using the
grafbase.graphql.argument_directivesoption:option (grafbase.graphql.argument_directives) = "@constraint(minLength: 1)";in method optionsFixed
closes GB-9518