This repository has been archived by the owner on Aug 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Relax dependency requirements #66
Comments
Also, could you make |
@bessey Thanks for openning an issue! I'm curious what you're using the query extraction for? Also as a heads up, we're close to deprecating this package in favor of the apollo-cli, so your best bet would be to use that. It can generate types and extract queries with something like |
#67 for reference |
Oh sweet, I had a look at that but misinterpreted it as only a type
generator.
I am or by the sounds of it was using this package to do something pretty
wacky... Server side render an Apollo React component tree... In a Rails
app. We use hypernova for SSR but it is synchronous so the component must
be hydrated with its data ahead of time. Your honestly amazing tooling
allows me to pull the query out of my JS, write it to a file during deploy,
and then lookup the query by operation name in Rails at runtime, to execute
the query there. Then I wrap the component in js with a HOC that takes the
results and writes them into the Apollo cache before component mount, again
using the operation name to find the matching query.
... Honestly, I can't believe it works but it works superbly! I'll probably
write up a blog post about it because I've not seen anyone else using this
technique, though I'm sure others have.
…On Fri, 27 Jul 2018, 22:32 Evans Hauser, ***@***.***> wrote:
#67 <#67> for
reference
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArOaFoJoR-AX7ofJPWuimFmF8Dj9tpDks5uK4cEgaJpZM4VkWij>
.
|
FYI I got around to writing up my use case, just in case you were interested in more details |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using this tool just to extract queries from JS files, and it does that great, but the strict dependcy requirements cause it to load a version of
graphql
that doesn't support theInterface1 & Interface2
SDL syntax, and also it brings in a dated version of Apollo too. I'm using Yarn'sresolutions
to push the requirements of:up to:
and for my use case, it seems to work fine.
The text was updated successfully, but these errors were encountered: