Alex / KATT

Results 435 comments of Alex / KATT

For me, it's all about getting static types to be preserved and used interchangeably across the HTTP boundary. Ideally, I'd like to be able to have some sort of mapper...

@tonyxiao > Having the same need also. Our query result depends on `context`, specifically the `viewAs` param within context (this is an admin portal that display different data for different...

I have a similar setup and we just pass this id it as an input everywhere, it's a lil' bit annoying but it's cheaper to deal with than an implicit...

The way I do it: 1. Add the `selectedApp` to the URL, e.g. `/app/[selectedApp]/...` 2. Make a hook called `useSelectedAppId` to grab it from the URL ([example](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBHA3nArgZwKYCUIphqOAXzgDMoIQ4ByAOwwA8YB6CvA6gKG9JVoGMYwCLVSYAgmDABJACYAKAJQAuOGhhRgtAOZJOCBPxHq4AQyly4AXjHZc+KEoB0ARxQEAnk-MzZAbn0DYFI4eRgPMAwIEJ9LAEIrG2p1TR1qRT0DLLgYAAsKAHc4eiKAUSgKR2oAOQgzC1k4LTgAVSwAGXTAhCJuuD6oDBgUKFFY-05eoA)) 3. Use `useSelectedAppId`...

> Hmm, so different queryClient would guarantee different cache and effectively solve the issue with the global queryKey right? Correct

> @KATT just tested creating new query client does not appear to cause any queries to refetch, I believe this is because of the fact that `useQuery` seems to create...

You could also put `key={queryClientKey}` on your top-most component... forcing re-rendering should trigger it as you want https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgRQK4FMoE8DCAbYdAOxgBoUNt9CSAFKCAN2ABNM4BfOAMwZDgDkAARgBDIgGcxAYwDWAeijpR0mAFoAjpSwCA3AChQkWIjgALGDDAAhUTGlmAMsCKzOPPoJFQw0+dIJiGD1DcGh4ACVlVXIkVAl0AGUxGHR3Xgh+ASUVYIMjcLhTePQIiFRUqHTPASJ0AA8YRXLKgX0YLDA0gDEASQANAFkAUTgAXjhxLANpCEl4GB9pcbgiVDw8SYk4PqHhg319blQiVWA5uBKAQTAwXpYACgBKRH0iotn5ydv7lZKyiqYZ4AOi0mCwwNEPxYBnecGA3DgDw6XQgiKhdxYcAAhGMJgIpFAXABzAQvBBvOHvJQwVBQIirdZ4SlFDgsuDsml0hkY+4GNlHE5nC4lHBzVKNVCiPBocHUILPV5FeTyOA4HKpSZwLpQCTAKRBOBKWZQLFoyYbSaMUTAPCiABGeDSYOwcACNBgEkpnykcAA2i7cIESIMoQBdP4JZJ2dAAHiiJpYscJJPIsqowZgAD4sw8EBwngdvXNfbysRNrtDnrCOR8S-BZOgsCsy3AAPxtwQAfS7RAgXYxXdYIUpKrgAHF0PBoG6NWlRHBA27M5SnfBA-KSCsN5nQ2A-Y2sGGawikdidx7yeyL4aJnUAO4UOWZ6vX7SbmB7g9NiMTG8kGs2SKLl6SVd5D1Idl3SCAAuRd30zSDWX0AUGmMeBjlOGBzgZG4wEVCk6y+VsKwSPD7lfUdVRKN1xQaWlpXg8Flw9Ysvn-eBSPQMUSHoqUZQQj1KKI30-UWXwP1-S4oxSdAHkVMYs3ZcTpGBaQ5w-PN2SKAhXAkOC-W094LCsWx7CcFxZC0qkqTpPA4IEEywBglU8AgaRpTMCApBggBmAAGQL5BUgQkJsuEzGUNhdQIoybNPB5sTLK9wtSo0p25RAOBrNLODiqkQIZQjcveAR6jUDE1GHODWzC3Lsvy1k6qpAtmqKMNmtaylC0pSlCqRdlYxU4F6CYVh2GgkgxgQFSPy4Djpo4tTMy4Q9FsEoJgUPDglJs2N0yDD1RuYaKWKCdbnw9ZaPR2-KEHkAAqOAAE1yiqDFzEwNIHvkICqVjeQDo-Y7xqgXb3gB4aQei8Geo4IA

> Is there a reason that GET is necessary at all? Would it be a problem if all invocations were changed to POST with a body rather than adding more...

Yup, `_method` is what I'm thinking too

Added a failing test suite in #5099 if someone wants to pick it up