GithubHelp home page GithubHelp logo

FieldMask demo is wrong about grpc-example HOT 5 CLOSED

gogo avatar gogo commented on June 30, 2024
FieldMask demo is wrong

from grpc-example.

Comments (5)

johanbrandhorst avatar johanbrandhorst commented on June 30, 2024

Hi! Yeah I must've forgotten to change this when I merged it, you're right that the patch feature doesn't work with gogoproto, allow_patch_update=false is required to avoid a compilation error (as you noticed). The only option if you want to use gogoproto is to expose the fieldmask and user type explicitly. I'm gonna change the signature to fix this.

from grpc-example.

tzachshabtay avatar tzachshabtay commented on June 30, 2024

@johanbrandhorst I was hoping you'll find a way to make it work with the patch feature (at least for us, and I'm guessing other companies too, grpc-gateway is meant for letting operations interact with the services with the likes of Postman, and in that case exposing the field mask to the user is dangerous, as a human being might forget to set it).

from grpc-example.

johanbrandhorst avatar johanbrandhorst commented on June 30, 2024

Feel free to experiment with it, but I just don't think it's possible. I don't have the time to do it myself. I nowadays recommend users avoid gogoproto for this and other reasons.

from grpc-example.

tzachshabtay avatar tzachshabtay commented on June 30, 2024

@johanbrandhorst thanks for the response. I'm curious about why you recommend people to avoid gogoproto (except for this issue), do you have a post about this somewhere I can read?
Thanks.

from grpc-example.

johanbrandhorst avatar johanbrandhorst commented on June 30, 2024

https://jbrandhorst.com/post/gogoproto/ was a post I wrote a while a go saying "it's not so bad" but really I've come to change my mind, the benefits aren't really worth the costs to me anymore. It's cases like this that show it'll never be a first class citizen in the ecosystem.

from grpc-example.

Related Issues (17)

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.