Closed cskiwi closed 1 week ago
We will need more information on this one.
Hi, @eneajaho,
I've found that it was an edge case using:
Removing the gql
of the query and using it as unkown/any/TypedDocumentNode, would fix this error, still strange how this this would matter.
I don't know if this error is ngexension related or apollo related
I've created a template here: https://github.com/cskiwi/angular-nestjs-full-starter
if you would go to file: libs\frontend\pages\home\src\components\home\page-home.component.ts
There change
exampleFetch = derivedAsync(() =>
this.apollo.query({
query: `
query Profile {
me {
id
name
}
}
` as unknown as TypedDocumentNode,
}),
);
to
exampleFetch = derivedAsync(() =>
this.apollo.query({
query: gql` // <-- use the gql import here
query Profile {
me {
id
name
}
}
` ,
}),
);
the error will show up
After some further investigation I was able to narrowed the issue down to my Apollo not being configured correctly for SSR/SSG.
Sorry to bother you with this issue. It wasn't easy to spot that it came from there :(
If I use any of the functions of ngxtension I get the following output when doing SSG:
I'm trying to figure out what might be causing this. However I could only pinpoint that it was using anything of ngextension. I don't have time right now to make an example.
Will try to make it tomorrow, but i'm making this issue to already keep track of it