Comments (8)
hi @westongcooper this is possible using the name
field option https://github.com/danielvladco/go-proto-gql/blob/master/pb/graphql.proto#L27
Check this example:
https://github.com/danielvladco/go-proto-gql/blob/master/example/codegen/pb/options.proto#L64
from go-proto-gql.
I am working on this project on my spare time, I don't really have a roadmap. But it looks like not a lot of work, so I will try to check it over the weekend.
from go-proto-gql.
Hey @westongcooper , sorry for long wait, I've been busy lately. I will have some changes in a few days
from go-proto-gql.
Is it possible to use this field options for a oneof
message type?
message Image {
oneof _type {
string url = 1;
Upload upload = 2;
option (gql.field) = {name: "_type"};
}
}
I get the following error with the above option.
Option field "(gql.field)" is not a field or extension of message "OneofOptions".
from go-proto-gql.
It is not supported on oneof's yet
from go-proto-gql.
@danielvladco any guesses how far out support for oneofs might be?
from go-proto-gql.
Any guess when we'll see an update?
from go-proto-gql.
@westongcooper @kogi check this PR #32 . The name applies only for generated graphql types and not inputs since the inputs don't use oneof as fields but rather take all oneof fields and flattens them into the parent input
from go-proto-gql.
Related Issues (20)
- Go install fails HOT 16
- protobuf.struct issues generating input HOT 7
- Directive prefix option
- Directives in options.graphql HOT 1
- Fresh install - ambiguous import HOT 6
- installation error: cannot find package "github.com/vektah/gqlparser/v2/ast" in any of: HOT 1
- Can't install gql and gogql due to mod replace HOT 3
- Is it possible to forward headers in the unified Gateway? HOT 1
- Document danielvladco.protobuf.graphql.required since proto3 fields all "optional" but GraphQL has "required" concept
- How to generate to Pascal case style?
- Add sensible scalar types for well-known types (wkts) especially google.protobuf.Struct
- Can you release a new version? HOT 1
- Adapt OpenAPI to GraphQL
- Adapt OpenRPC to GraphQL
- Proxy GraphQL to GraphQL
- Rename the project to something else
- Relay - Global Object Identification specification
- Python generation breaking python client
- Go install error when installing v0.10.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-proto-gql.