Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
Merge 2 queries from *.gql files into 1 query

I have some queries in *.gql files. I import them to a file then use print to convert them for axios. I wonder, is there any way that I could merge or combine these 2 queries into a query without apollo or any other npm packages?

# /user/account.gql

query userData {
  Me {
    id
    email
    level
    avatar
    first_name
    last_name
  }
}
# /ticket/list.gql

query ticketData ($id:ID,$offset:Int,$limit:Int) {
    Tickets(id:$id, offset:$offset, limit:$limit, pagination:true ) {
       id
       status
       title
       updated_at
    }
}
// Some JS file

import { print } from 'graphql/language/printer';

import userAcount from '../graphql/queries/user/acount.gql'
import ticketList from '../graphql/queries/tickets/list.gql'

const userAcountQuery = print(userAcount)
const ticketListQuery = print(ticketList)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!