Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PersitedQueryLink: AssetNotDestroyed Error when running ssr #2017

Open
luca-peruzzo opened this issue May 24, 2023 · 0 comments
Open

PersitedQueryLink: AssetNotDestroyed Error when running ssr #2017

luca-peruzzo opened this issue May 24, 2023 · 0 comments

Comments

@luca-peruzzo
Copy link

Describe the bug

I don't know why yet, but using createPersistedQueryLink function to create ApolloLink in ssr causes this runtime error

To Reproduce

import { sha256 } from 'crypto-hash';

...
const persist = createPersistedQueryLink({
        sha256,
        useGETForHashedQueries: false,
      });
const http = httpLink.create({
        uri: environment.graphqlEndpoint,
        withCredentials: true,
        useMultipart: false,
        useGETForQueries: false,
      });
      
const link = persist.concat(http)

Expected behavior

Work in ssr mode

Environment:

├─ @angular/cli@16.0.2
├─ @angular/core@16.0.2
├─ @apollo/client@3.7.14
├─ apollo-angular@5.0.0
├─ graphql@16.6.0
└─ typescript@4.9.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant