Skip to content

v0.26.0

Choose a tag to compare

@github-actions github-actions released this 06 Dec 23:40
· 235 commits to main since this release
18499be

Minor Changes

  • 5f0e7af: Make query and mutation definitions directly callable

    Query and mutation definitions from defineQuery and defineMutation are now directly callable functions:

    // Queries - callable defaults to ensure() behavior
    const { data, error } = await userQuery(); // same as userQuery.ensure()
    
    // Mutations - callable defaults to execute() behavior
    const { data, error } = await createUser({ name: "John" }); // same as createUser.execute()

    The explicit methods (.ensure(), .fetch(), .execute()) remain available for when you need different behavior or prefer explicit code.

    Breaking change: .options is now a property instead of a function. Update createQuery(query.options()) to createQuery(query.options).