We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a0ca9b commit d08d115Copy full SHA for d08d115
packages/query-core/src/__tests__/queryClient.test.tsx
@@ -714,6 +714,28 @@ describe('queryClient', () => {
714
expect(third).toBe(1)
715
expect(fourth).toBe(2)
716
})
717
+
718
+ test('should allow new meta', async () => {
719
+ const key = queryKey()
720
721
+ const first = await queryClient.fetchQuery({
722
+ queryKey: key,
723
+ queryFn: ({ meta }) => Promise.resolve(meta),
724
+ meta: {
725
+ foo: true,
726
+ },
727
+ })
728
+ expect(first).toStrictEqual({ foo: true })
729
730
+ const second = await queryClient.fetchQuery({
731
732
733
734
+ foo: false,
735
736
737
+ expect(second).toStrictEqual({ foo: false })
738
739
740
741
describe('fetchInfiniteQuery', () => {
0 commit comments