your recipe card header background

    Apollo React useMutation hook

    0

    2

    Jose Romero

    reactapollohook•••
    React JavaScript Recipes

    Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects. For this purpose, React Query exports a useMutation hook.

    Library: react

    Shortcut: apollo.hook.mutation.use

    import { useMutation } from '@apollo/client';
    
    const [createAPIToken] = useMutation(GRAPHQL_MUTATION, { 
      variables: {
        //
      },
      onCompleted: (data) => {
      	//
      });
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.