Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Option to only send APQ on queries not mutations #19

Open
billnbell opened this issue Jun 26, 2018 · 4 comments
Open

Option to only send APQ on queries not mutations #19

billnbell opened this issue Jun 26, 2018 · 4 comments

Comments

@billnbell
Copy link

When we call APQ

var link = createPersistedQueryLink().concat(createHttpLink({ uri: "/graphql" }))

It sends persisted queries even on mutations! We need something like useGETForHashedQueries but for this use case. Maybe name it useAPQOnlyForQueries.

No reason to call APQ on a mutation.

@Brickpsp
Copy link

Brickpsp commented Aug 6, 2018

+1

@frederikhors
Copy link

@billnbell can I ask you why do you want this?

Is not also on mutation useful to not exchange every time the query?

It's working very well I think.

@matfisch
Copy link

matfisch commented Dec 6, 2019

This behavior also does not make sense to me. An option to disable persisted queries on mutations would be great.

Mutations, at least in all my applications usually have a unique set of variable values. This results in the overhead of constant cache misses.

@nitedani
Copy link

nitedani commented Jul 28, 2020

With no option for this currently, authentication can't be done securely with automatic persisted queries. It would persist passwords in plain text.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants