-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
This is required to work around an issue where the older version of prettier wasn't playing nicely with Typescript, by reporting broken syntax when it wasn't.
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
==========================================
+ Coverage 98.76% 98.79% +0.02%
==========================================
Files 2 2
Lines 81 83 +2
Branches 23 23
==========================================
+ Hits 80 82 +2
Misses 1 1
Continue to review full report at Codecov.
|
@hwillson thanks for your work! @jbaxleyiii this repository looks sadly abandoned with no new commit since the end of 2018. Can you get someone to maintain this repo and merge this PR which looks like the fix for my issue at #51? |
import { InMemoryCache } from "apollo-cache-inmemory"; | ||
import ApolloClient from "apollo-client"; | ||
|
||
import { createPersistedQueryLink } from "@apollo/link-persisted-queries"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we lazy load this link, thus lazy-load the heavy graphql library that is used behind? It's only used for APQ, right? I've noticed that it's even bigger than react-dom. It would be nice to load fast first (and show cache data if available), then improve network performances with link-persisted-queries.
Hey @hwillson! Is this still on the roadmap as a candidate to be released? Or is this something that is planned to be released as part of the core Apollo package? I'm working on the upgrade to Apollo Client 3 and I'm stuck on this package as I am unsure what to do for the upgrade path. |
It seems like this repo does still work with the The minimal example that's working for me is below. import { ApolloClient, InMemoryCache, HttpLink } from '@apollo/client';
import { createPersistedQueryLink } from 'apollo-link-persisted-queries';
const link = createPersistedQueryLink({
useGETForHashedQueries: true,
}).concat(new HttpLink({ uri: 'https://example.com' }));
const client = new ApolloClient({
link,
cache: new InMemoryCache(),
}); |
I'm not sure why this was included before, but I'm assuming this was an oversight.
@hwillson Since Apollo maintains this link, and this PR is already planning to rename the npm package from |
Just a quick update here - we've discussed this internally and are going to move this link into the https://github.com/apollographql/apollo-client repo. That work will be done shortly. |
This work is being continued in apollographql/apollo-client#6837. |
This PR covers the updates required to work with Apollo Client 3, now that the Apollo Link core is part of
@apollo/client
. It also introduces a new package naming structure of@apollo/link-persisted-queries
. Note that@apollo/client
is still inbeta
, so this PR shouldn't be merged yet. When it is merged, we're going to release this package as a 1.0 version.