import { useQuery } from '@apollo/client';
      
      const { data, loading, error } = useQuery(
        graphQlQuery,
        {
          variables: { variableName: variableValue },
        },
      );
      
      Javascript language logo

      useQuery with variables

      graphql
      apollo
      GraphQL and JavaScript

      Call useQuery with a query that requires variables.

      Shortcut: graphql.query.withvariables

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.