eslint-plugin-graphql
eslint-plugin-graphql copied to clipboard
Strange errors for a valid query
- [ ] has-reproduction
- [ ] feature
- [ ] docs
- [ x] blocking
- [ ] good first issue
The query below is valid and tested, but this plugin reports an error:
44:1 error Syntax Error: Unexpected .. graphql/template-strings
import shopifyGql from "graphql-tag";
export const shopifyCustomersWithOrdersNodeFragment = shopifyGql`
fragment CustomersWithOrdersNodeFragment on CustomerEdge {
cursor
node {
email
id
displayName
ordersCount,
lastOrder{
createdAt
}
orders(first: $firstOrders, query: $ordersQuery) {
edges {
node {
id
createdAt
customer {
displayName
}
displayFinancialStatus
displayFulfillmentStatus
totalPrice
}
}
}
}
}
`;
export const getShopifyCustomersWithOrdersQuery: any = shopifyGql`
query GetShopifyCustomersWithOrders($firstCustomers: Int, $lastCustomers: Int, $firstOrders: Int!, $customersAfter: String, $customersBefore: String, $customersReverse: Boolean, $customerQuery: String, $ordersQuery: String, $customersSortKey: CustomerSortKeys) {
customers(first: $firstCustomers, last: $lastCustomers, after: $customersAfter, before: $customersBefore, reverse: $customersReverse, query: $customerQuery, sortKey: $customersSortKey) {
pageInfo {
hasNextPage,
hasPreviousPage
}
edges {
...CustomersWithOrdersNodeFragment
}
}
}
${shopifyCustomersWithOrdersNodeFragment}
`;