keikoproj / manager

Multi K8s cluster Namespace Management
Apache License 2.0
9 stars 3 forks source link

GraphQL Vs REST? #16

Open mnkg561 opened 4 years ago

mnkg561 commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?: QUESTION

What happened: We might have to take this opportunity to think and see if we can use graphQL to publish the APIs instead of REST. Graphql comes with some good advantages but we are gonna have some challenges in terms of code generation tools. we already have two types of data structures i.e, one for controller where kube builder auto generates open API schema and CRDs and grpc .proto files with almost same fields but protogen generates its own structures and starting from latest release of go-protobuf, protogen generated structs will not have json tags for auto generated fields and for kubebuilder it is mandatory.

And, if we include grapql.schema where we need to define the types separetly. so if we needed to add/update/remove any field to the existing schema we need to do that change in 3 different places and in no time this gets very ugly. I would love to see if someone comes up with any kind of tool for auto generation based one defination(.proto -> graphql as well as kubebuilder supported structures).

Looks like google already have https://github.com/google/rejoiner but thats specific to java.

What you expected to happen: Finalize on how to publish APIs

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

Other debugging information (if applicable):

- controller logs:

$ kubectl logs