Apollo-link-rest: Plan of action!

Created on 30 Nov 2017  ·  10Comments  ·  Source: apollographql/apollo-link-rest

Now that we have an initial design lets break up the work to get it done!

Special thanks to @sabativi who wrote the version on master to experiment and try out the link! We have a great starting point thanks to you! And to @fbartho who has helped inform the design in a great way and pushed for the project to be built!

If anyone wants to help, please comment with what they want to do!

Tasks

  • [x] update structure / tooling to match apollo-link-state

    • [x] prettier

    • [x] typescript

    • [x] ci tools

  • [x] update directive naming to be @rest
  • [x] update Link Class name to be RestLink instead of RestAPILink
  • [x] update endPoint to be endpoint
  • [x] split concept of endpoint for the @rest(… directive, and name it path: for the server path (without the host).
  • [x] support map of imports with endpoints: optional parameter for people who have more than one RestLink
  • [x] support fetch + headers / credentials
  • [x] support customFetch: optional parameter.
  • [x] support method: parameter on rest calls.
  • [x] support fieldNameNormalizer
  • [x] @export directive
  • [x] move to using apollo-utilities where possible (see link-state)
  • [ ] support mixed and nested directive usage

    • [ ] support support sending part of the request to graphql endpoint and part to rest

    • [ ] nested request (i.e. after a partial response from a graphql server or a previous rest call)

  • [ ] Add tests that show how to integrate apollo-client
  • [ ] Add example apps that show how to use apollo-client with apollo-link-rest

All 10 comments

Also, join us in the #apollo-link-rest channel on slack!

What would be the smallest thing to start with in terms of contribution effort? I guess something like fetch method or headers?

PS: thanks a lot for pushing this project, really exited to see it working! 🙌

@emmenko yeah that would be a great start! You should be able to pull a lot of code from how apollo-link-http works for this!

Let me know if you have any questions, I'm so excited you want to be a part of this project 🎉

Well, I'm glad if I can help somehow. However I don't have the time to fully contribute to this project, so don't expect too much from me 🙏😅

With that said, I'll try to focus on those parts first. Let's see how it goes 🚀

I guess I can also add the credentials part, it's more or less copy-pasta from the http link 😅

I will work this week on 'support mixed and nested directive usage'.
To do this I will try to rewrite the logic with graphql-anywhere.
Also, after looking at link-state, we use apollo-utililies the same way.

Any smaller tasks remaining that I could take a pass at? Looking to contribute, but it looks like most of the tasks in this issue have been completed or are more complex?

@Skovy I didn't get a chance to take on the credentials part yet. It's a really small task, you can take this over if you'd like 😉

@emmenko cool, I'll take a stab at it! 👍

Closing this ticket, since the remaining issues are separately tracked in the issue db!

Was this page helpful?
0 / 5 - 0 ratings