command for importing fetchgraphqlquery in nextjs

To import fetchGraphQLQuery in Next.js, you can use the following command:

import { fetchGraphQLQuery } from 'next-graphql-request';

Explanation:

  1. The import keyword is used to import the fetchGraphQLQuery function.
  2. The curly braces {} are used to specify the specific named export from the module that we want to import.
  3. The fetchGraphQLQuery function is imported from the module next-graphql-request.
  4. The string 'next-graphql-request' specifies the name or path of the module that contains the fetchGraphQLQuery function.

By using this import statement, you will have access to the fetchGraphQLQuery function in your Next.js code, allowing you to make GraphQL queries using the next-graphql-request library.