diff --git a/go.mod b/go.mod index d17bb491..2ef659c1 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.24.6 require ( entgo.io/contrib v0.7.0 entgo.io/ent v0.14.5 - github.com/99designs/gqlgen v0.17.81 + github.com/99designs/gqlgen v0.17.82 github.com/Yamashou/gqlgenc v0.33.0 github.com/brianvoe/gofakeit/v7 v7.8.2 github.com/hashicorp/go-multierror v1.1.1 @@ -162,17 +162,17 @@ require ( go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.43.0 // indirect golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b // indirect - golang.org/x/mod v0.28.0 // indirect - golang.org/x/net v0.45.0 // indirect + golang.org/x/mod v0.29.0 // indirect + golang.org/x/net v0.46.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.17.0 // indirect golang.org/x/sys v0.37.0 // indirect golang.org/x/text v0.30.0 // indirect golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.37.0 // indirect + golang.org/x/tools v0.38.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect google.golang.org/grpc v1.75.0 // indirect - google.golang.org/protobuf v1.36.9 // indirect + google.golang.org/protobuf v1.36.10 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index fe8737d1..a4f552e2 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,8 @@ entgo.io/ent v0.14.5 h1:Rj2WOYJtCkWyFo6a+5wB3EfBRP0rnx1fMk6gGA0UUe4= entgo.io/ent v0.14.5/go.mod h1:zTzLmWtPvGpmSwtkaayM2cm5m819NdM7z7tYPq3vN0U= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/99designs/gqlgen v0.17.81 h1:kCkN/xVyRb5rEQpuwOHRTYq83i0IuTQg9vdIiwEerTs= -github.com/99designs/gqlgen v0.17.81/go.mod h1:vgNcZlLwemsUhYim4dC1pvFP5FX0pr2Y+uYUoHFb1ig= +github.com/99designs/gqlgen v0.17.82 h1:LIjjEVg171V4iZw93YZUFOavupJSuTIKGG2yVtsZAwM= +github.com/99designs/gqlgen v0.17.82/go.mod h1:OAIe6FVa2bFsmPgG6SIG+82prReTsqKekS7wgkJyUR4= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= @@ -384,15 +384,15 @@ golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b h1:DXr+pvt3nC887026GRP39Ej11 golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b/go.mod h1:4QTo5u+SEIbbKW1RacMZq1YEfOBqeXa19JeshGi+zc4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= -golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= +golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM= -golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -437,8 +437,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= -golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= @@ -449,8 +449,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1: google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc= google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= -google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw= -google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/internal/graphapi/annotation.resolvers.go b/internal/graphapi/annotation.resolvers.go index eba07572..c77ed9bf 100644 --- a/internal/graphapi/annotation.resolvers.go +++ b/internal/graphapi/annotation.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 import ( "context" diff --git a/internal/graphapi/annotationnamespace.resolvers.go b/internal/graphapi/annotationnamespace.resolvers.go index 9b01e68e..29423e62 100644 --- a/internal/graphapi/annotationnamespace.resolvers.go +++ b/internal/graphapi/annotationnamespace.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 import ( "context" diff --git a/internal/graphapi/ent.resolvers.go b/internal/graphapi/ent.resolvers.go index 44936b25..9ff02204 100644 --- a/internal/graphapi/ent.resolvers.go +++ b/internal/graphapi/ent.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 // AnnotationNamespace returns AnnotationNamespaceResolver implementation. func (r *Resolver) AnnotationNamespace() AnnotationNamespaceResolver { diff --git a/internal/graphapi/entity.resolvers.go b/internal/graphapi/entity.resolvers.go index 29b36ced..4e2257b6 100644 --- a/internal/graphapi/entity.resolvers.go +++ b/internal/graphapi/entity.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 import ( "context" diff --git a/internal/graphapi/metadata.resolvers.go b/internal/graphapi/metadata.resolvers.go index 5ecf423a..c3071a3b 100644 --- a/internal/graphapi/metadata.resolvers.go +++ b/internal/graphapi/metadata.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 import ( "context" diff --git a/internal/graphapi/resourceowner.resolvers.go b/internal/graphapi/resourceowner.resolvers.go index 5ab31cf8..96254339 100644 --- a/internal/graphapi/resourceowner.resolvers.go +++ b/internal/graphapi/resourceowner.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 import ( "context" diff --git a/internal/graphapi/status.resolvers.go b/internal/graphapi/status.resolvers.go index af63d30e..cb8dc064 100644 --- a/internal/graphapi/status.resolvers.go +++ b/internal/graphapi/status.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 import ( "context" diff --git a/internal/graphapi/statusnamespace.resolvers.go b/internal/graphapi/statusnamespace.resolvers.go index b4c18c8d..2dc6a801 100644 --- a/internal/graphapi/statusnamespace.resolvers.go +++ b/internal/graphapi/statusnamespace.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 import ( "context" diff --git a/internal/graphapi/statusowner.resolvers.go b/internal/graphapi/statusowner.resolvers.go index 018b420c..bb6b5804 100644 --- a/internal/graphapi/statusowner.resolvers.go +++ b/internal/graphapi/statusowner.resolvers.go @@ -2,7 +2,7 @@ package graphapi // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.81 +// Code generated by github.com/99designs/gqlgen version v0.17.82 import ( "context" diff --git a/internal/testclient/gen_models.go b/internal/testclient/gen_models.go index 3ce8581f..612bfc24 100644 --- a/internal/testclient/gen_models.go +++ b/internal/testclient/gen_models.go @@ -26,10 +26,9 @@ type Entity interface { } type Annotation struct { - // ID for the annotation. - ID gidx.PrefixedID `json:"id"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + Node + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` // ID of the metadata of this annotation MetadataID gidx.PrefixedID `json:"metadataID"` // JSON formatted data of this annotation. @@ -78,10 +77,9 @@ type AnnotationEdge struct { } type AnnotationNamespace struct { - // The ID for the annotation namespace. - ID gidx.PrefixedID `json:"id"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + Node + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` // The name of the annotation namespace. Name string `json:"name"` // Flag for if this namespace is private. @@ -291,10 +289,9 @@ type CreateStatusNamespaceInput struct { } type Metadata struct { - // ID for the metadata. - ID gidx.PrefixedID `json:"id"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + Node + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` // ID of the node for this metadata NodeID gidx.PrefixedID `json:"nodeID"` Annotations *AnnotationConnection `json:"annotations"` @@ -389,6 +386,18 @@ type MetadataWhereInput struct { type Mutation struct { } +// An object with an ID. +// Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) +type Node struct { + // The id of the object. + ID gidx.PrefixedID `json:"id"` +} + +func (Node) IsNode() {} + +// The id of the object. +func (this Node) GetID() gidx.PrefixedID { return this.ID } + // Information about pagination in a connection. // https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo type PageInfo struct { @@ -415,9 +424,9 @@ type ResourceOwner struct { func (ResourceOwner) IsEntity() {} type Status struct { - ID gidx.PrefixedID `json:"id"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + Node + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` // ID of the metadata of this status MetadataID gidx.PrefixedID `json:"metadataID"` StatusNamespaceID gidx.PrefixedID `json:"statusNamespaceID"` @@ -470,10 +479,9 @@ type StatusEdge struct { } type StatusNamespace struct { - // The ID for the status namespace. - ID gidx.PrefixedID `json:"id"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + Node + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` // The name of the status namespace. Name string `json:"name"` // Flag for if this namespace is private.