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

Typescript error with ts generated file for cacheWrite methods #16

Open
smblee opened this issue Sep 2, 2020 · 1 comment
Open

Typescript error with ts generated file for cacheWrite methods #16

smblee opened this issue Sep 2, 2020 · 1 comment

Comments

@smblee
Copy link

smblee commented Sep 2, 2020

return apolloCache.writeQuery<${fragmentNamePascalCase}Fragment | null>({ query: ${queryByIdName}Document, variables: { ${entityShortCamelCaseName}Id }, data: (${fragmentNameCamelCase} ? ${fragmentNameCamelCase}Partial : null), broadcast:apolloBroadcast });

image

Running @apollo/client version 3.1.4.

Looks like the types were updated here: apollographql/apollo-client@7202b78#diff-a425d86f9a8376d3071667e3198c940a

The solution here would be to not return the result of apolloCache.writeQuery... ?

@jamshally
Copy link
Member

Hi @smblee

Thanks for reporting. I'll take a look and make the updates when I get a chance. It might be a little while, before I can get to it. But, also, feel free to make the changes and submit a pull request.

Thanks!

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

2 participants