reasonml-community / reason-apollo-hooks

Deprecated in favor of https://github.com/reasonml-community/graphql-ppx
https://reasonml-community.github.io/reason-apollo-hooks/
MIT License
137 stars 28 forks source link

Adds basic query context support #100

Closed pckilgore closed 4 years ago

pckilgore commented 4 years ago

This is a WIP until I can test it a bit, but the idea is to give consumers basic access to the query context through a key-value map.

~The usual case will be (key: string, value: string), but I didn't really see a need to contrain the type of value so I have not yet done so.~

This approach led to a little too much type annotation, so I'm sticking with <string, string> for now, even though Apollo supports <string, any>

pckilgore commented 4 years ago

Shoot, as much as I want to keep targeting 6 with this, I need to target a different version so that I can consume this easier since yarn linking this broke a build. I'll leave this branch up I plan on backporting this same change.

fakenickels commented 4 years ago

Promise I'll review soon!

mbirkegaard commented 4 years ago

Shoot, as much as I want to keep targeting 6 with this, I need to target a different version so that I can consume this easier since yarn linking this broke a build. I'll leave this branch up I plan on backporting this same change.

Hi Patrick. What's the status on this? Did you want to do more on it or is it ready for review?

pckilgore commented 4 years ago

Can't remember 😂, let me check when I am back from vacation in a week.

      - Patrick

On Mon, Feb 17, 2020, 5:31 AM Mikkel notifications@github.com wrote:

Shoot, as much as I want to keep targeting 6 with this, I need to target a different version so that I can consume this easier since yarn linking this broke a build. I'll leave this branch up I plan on backporting this same change.

Hi Patrick. What's the status on this? Did you want to do more on it or is it ready for review?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Astrocoders/reason-apollo-hooks/pull/100?email_source=notifications&email_token=AATQYQ66SAXHXQTCKKYZTUTRDJYSPA5CNFSM4KMTX6F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL6CQEI#issuecomment-586950673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATQYQ6ZZDEPR5NKN4DKIP3RDJYSPANCNFSM4KMTX6FQ .

mbirkegaard commented 4 years ago

@pckilgore Bump!

pckilgore commented 4 years ago

This should be good to go, but we ended up solving our problem without using context, so I've never actually ran real code against this API and I never had a need for it outside work.

I'm happy to help push this through but no strong feelings if ya'll would prefer to wait to implement this until it has a champion to work on it who will actually be using it.

pckilgore commented 4 years ago

So it's ready for review