
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@graphitation/ts-transform-graphql-js-tag
Advanced tools
TS transform to convert all instances of "@graphitation/graphql-js-tag" or another graphql tag library to parsed document definitions.
TS transform to convert all instances of "@graphitation/graphql-js-tag" or another graphql tag library to parsed document definitions.
This is inspired by ts-transform-graphql-tag library, but modified to fit our use case better and support transformers.
It differs from many transformers in that it doesn't use underlying tag library at all. Instead it uses graphql-js to parse definitions and output documents.
ts-loader
In the webpack.config.js file in the section where ts-loader is configured as a loader:
// 1. import `getTransformer` from the module
import { getTransformer } = from "@graphitation/ts-transform-graphql-js-tag"
// 2. create a transformer and add getCustomTransformer method to the loader config
var config = {
// ...
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
options: {
// ... other loader's options
getCustomTransformers: () => ({ before: [getTransformer({})] }),
},
},
],
},
// ...
};
graphqlTagModule?: string;
- which graphql tag module you are using. Default: @graphitation/ts-transform-graphql-js-tag
graphqlTagModuleExport?: "default" | string;
- what export from that module is graphql template tag. Default: gql
.transformer?: (node: FragmentDefinitionNode | OperationDefinitionNode) => unknown
- optional transformer to apply to graphql definitions before
emitting them. Note that result should be emittable by TypeScript, so it should be a plain object.FAQs
TS transform to convert all instances of "@graphitation/graphql-js-tag" or another graphql tag library to parsed document definitions.
The npm package @graphitation/ts-transform-graphql-js-tag receives a total of 6 weekly downloads. As such, @graphitation/ts-transform-graphql-js-tag popularity was classified as not popular.
We found that @graphitation/ts-transform-graphql-js-tag demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.