4
Mb3leb
4y

Do you think that Graphql is the future?
Should i invest time in it? Or it's just a hype like anything else?

Comments
  • 2
    Give it a try. There is money to be made there and it looks good on your cv.
  • 7
    Graphql is useful in places where it is appropriate. It's not really a replacement for anything.

    Have a broad api dependency surface that requires your front end code to call n-systems repeatedly? Graphql will make your life easier. Have a single api that is factored in an a manner where your api dependency is already simple and efficient? It's not particularly valuable.
  • 0
    @SortOfTested can you give me an example
  • 1
  • 2
    Well it’s implementation of rpc.
    You have subscriptions for push messages. Mutations for data modification and Query for returning data. So there is not much to learn despite to understand how it works.

    It’s nice that you have this nice cli like swagger for rest out of the box where you can see objects and methods. Most libraries implement self documenting patterns to push information about of objects to client.

    Definitely worth to spend a day and check it out by making some simple todo list crud backend.

    It have nice features like ID that you can use for caching and as a result optimize backend workloads and there are libraries where you can wrap multiple rest and graphql into one big pile so yeah might be that in the future if companies want to expose their api they will do it over graphql.

    But can be also that grpc will take over http. Who knows what bighead is thinking about.
  • 3
    It seems like it fits situations with a lot of different data that the front end needs to consume in a myriad of different ways.

    I haven't run into that yet professionally, but it does seem like it will stick around to some extent for those use cases and it can save a lot of effort.
  • 3
    It’s a tool like any other.
    Use it where appropriate and it’s great. Use it elsewhere and, while it might still work, there are better choices.

    Real example: you can use a knife for basically anything in the kitchen, but a spoon will always work better for stirring, and a grater works better for grating cheese.

    Similarly: pliers make a serviceable hammer in a pinch, but you wouldn’t want to forego a real one.
  • 1
    GraphQL queries are just flavoured SQL queries.
  • 2
    This is like asking "Are 5mm screws the future". It's just a tool that helps certain scenarios. Learn it if you have such scenarios. There's no such tool that magically constitutes the "future" whatever the heck that means.
Add Comment