Open lermontex opened 4 months ago
I'm using Vue 3 + Apollo GraphQL (composition API). I don’t use additional files (.gql/.graphql) to store GraphQL queries, but write them directly in files with the .vue extension, here’s a simple example:
.vue
// ... import { gql } from "@apollo/client/core"; // ... const { mutate: createInvoiceMutationMutate, } = useMutation( gql` mutation createInvoice($input: createInvoiceInput!) { createInvoice(input: $input) { clientMutationId invoice { id } } } `, );
Unfortunately, at the moment there is no way to handle such a GraphQL query using @rollup/plugin-graphql
It would be great to be able to handle GraphQL queries that are declared in template files if they are wrapped in gql literal
gql
UPD: https://github.com/apollographql/graphql-tag
Feature Use Case
I'm using Vue 3 + Apollo GraphQL (composition API). I don’t use additional files (.gql/.graphql) to store GraphQL queries, but write them directly in files with the
.vue
extension, here’s a simple example:Unfortunately, at the moment there is no way to handle such a GraphQL query using @rollup/plugin-graphql
Feature Proposal
It would be great to be able to handle GraphQL queries that are declared in template files if they are wrapped in
gql
literalUPD: https://github.com/apollographql/graphql-tag