Git Product home page Git Product logo

Comments (8)

danielvladco avatar danielvladco commented on July 18, 2024 2

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.

danielvladco avatar danielvladco commented on July 18, 2024 2

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.

danielvladco avatar danielvladco commented on July 18, 2024 1

Hey @westongcooper , sorry for long wait, I've been busy lately. I will have some changes in a few days

from go-proto-gql.

westongcooper avatar westongcooper commented on July 18, 2024

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.

danielvladco avatar danielvladco commented on July 18, 2024

It is not supported on oneof's yet

from go-proto-gql.

bobjackman avatar bobjackman commented on July 18, 2024

@danielvladco any guesses how far out support for oneofs might be?

from go-proto-gql.

westongcooper avatar westongcooper commented on July 18, 2024

Any guess when we'll see an update?

from go-proto-gql.

danielvladco avatar danielvladco commented on July 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.