Nebular: GraphQl support

Created on 7 Mar 2019  路  7Comments  路  Source: akveo/nebular

Issue type

I'm submitting a ... (check one with "x")

  • [ ] bug report
  • [x] feature request

I guess nebular auth need integration with graphql apis not only https apis out of the box. Maybe with apollo client for angular could be nice.

enhancement help wanted auth

Most helpful comment

I'd love to see all components support graphql on the client side having client side resolvers to encapsulate any business logic (with agular services inside the resolvers) vs calling services from the components directly.

Apollo should be the ONLY service that gets passed down to components as it represents a fully typesafe api to interact with the datamodel and state of the app.

Having services in the components completely breaks the biggest benefits of using graphql on the clientside as either you need to create specialized service calls for each component or you end up with more fields than you need or fields that are not filled depending on how you call the services.
In addition it makes handling caching, especially cache invalidation very difficult as graphql is encapsulated in services.

In the past this was not possible, but since apollo 2.5 and the dawn of fully available client side resolvers we can now finally prep nubular to be future ready

All 7 comments

@anthowm would be a great way to contribute!

Is this issue available?, if yes, then I would love to work on this, :)

It very much is! :)

Great, I will start working on it, will ping you guys if I have a question or get stuck, :)

@kartik-budhiraja sure thing. As a suggestion, we may start from tech doc where you can describe the approach, some details on configurations and corner cases. Then we can discuss the details and then move on to actual coding. It may save some time on revies and discussions on the next steps. I believe this could be a comment in this very issue, so no need in something heavy like google docs.

@kartik-budhiraja @nnixaa I didnt get the notifications omg, well if you need help with your approach I can help you too, by the moment I can give you a graphql server for test if your approach works https://github.com/anthowm/graphqlpetapi-backend.

I'd love to see all components support graphql on the client side having client side resolvers to encapsulate any business logic (with agular services inside the resolvers) vs calling services from the components directly.

Apollo should be the ONLY service that gets passed down to components as it represents a fully typesafe api to interact with the datamodel and state of the app.

Having services in the components completely breaks the biggest benefits of using graphql on the clientside as either you need to create specialized service calls for each component or you end up with more fields than you need or fields that are not filled depending on how you call the services.
In addition it makes handling caching, especially cache invalidation very difficult as graphql is encapsulated in services.

In the past this was not possible, but since apollo 2.5 and the dawn of fully available client side resolvers we can now finally prep nubular to be future ready

Was this page helpful?
0 / 5 - 0 ratings