Converts .graphql files to .js formatted with graphql-tag.
Automatically handles fragments imported using #import.
node path/to/script.js path/to/project/src
#import "./FragmentEntry.graphql"
fragment article on articles_article_Entry {
...entry
articleType {
title
slug
}
}import gql from "graphql-tag";
import FragmentEntry from "./FragmentEntry";
const FragmentArticle = gql`
${FragmentEntry}
fragment article on articles_article_Entry {
...entry
articleType {
title
slug
}
}
`;
export default FragmentArticle;