Libraries
    Preparing search index...
    • Builds a query key array for an entire API group.

      Use this with queryClient.invalidateQueries() to invalidate all cached queries belonging to a group at once.

      Parameters

      • group: string

        The API group name (e.g. 'todos').

      Returns readonly unknown[]

      A readonly query key array that is a prefix of all endpoint keys within the group.

      buildGroupQueryKey('todos');
      // ['@cleverbrush', 'todos']

      // Invalidate all todo-related queries:
      queryClient.invalidateQueries({ queryKey: buildGroupQueryKey('todos') });