Create the @parcel/transformer-graphql package in packages/transforms/graphql. This package is a Parcel 2 transform plugin for GraphQL. It should be based on the GraphQLAsset from Parcel 1.
The @parcel/transformer-graphql package is responsible for the following things:
#import directivesgraphql-tagCurrently, all of this happens inside the transformer, including recursively collecting dependencies. Ideally, the transformer would just expose the top-level imports as dependencies, and let Parcel traverse them. Finally, a packager should be able to combine them together. This will require some additional work, however, in order to allow inlining the results into a JS bundle. See also #3301 #3352.
i'm taking this. wish me luck guys 🔥
Hi. Would be nice to support named imports. I mean, to have multiple queries/mutations in only one graphql file, like:
query myQuery {
name
id
}
query myOtherQuery {
desc
}
import { myQuery, myOtherQuery } from "./queries.graphql";
Most helpful comment
i'm taking this. wish me luck guys 🔥