We're excited to share the v0.2.0
release!
This release contains some new functionality on all modules as well as a slight change in the default behavior of the entproto
gRPC integration (see below).
Special thanks goes to everyone that contributed to this release: @tsingsun, @rotemtam, @yonidavidson, @a8m, @JeremyV2014, and @masseelch!
Summary
entgql
- upgrade gqlgen to v0.14.0 (#136)
- add back fields collection for node template
entoas
entproto
- support field.Float and field.Float32 (#153)
- documenting local dev flow (#159)
- implement service method generation control (#158)
- entproto: implement list service method (#162)
schemast
- support field.Time (#139)
Changes to default behavior
With #162 (contributed by @JeremyV2014), we added support for the List
method on
code generated by protoc-gen-entgrpc
. The method signature looks like:
service AttachmentService {
// ..
rpc List ( ListAttachmentRequest ) returns ( ListAttachmentResponse );
}
Where the input is:
message ListAttachmentRequest {
int32 page_size = 1;
string page_token = 2;
View view = 3;
enum View {
VIEW_UNSPECIFIED = 0;
BASIC = 1;
WITH_EDGE_IDS = 2;
}
}
This method is generated on all services by default. If you would like to control which methods get generated, support for method generation control was added (by @JerembyV2014 as well) in #158. As you can see in the docs, you can now configure this in your schema, for instance, by using:
func (User) Annotations() []schema.Annotation {
return []schema.Annotation{
entproto.Message(),
entproto.Service(
entproto.Methods(entproto.MethodCreate | entproto.MethodGet),
),
}
}