
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@volst/graphql-import
Advanced tools
[](https://circleci.com/gh/graphcool/graphql-import) [](https://badge.fury.io/js/graphql-import)
Import & export definitions in GraphQL SDL (also refered to as GraphQL modules)
There is also a
graphql-import-loader
for Webpack available.
yarn add graphql-import
import { importSchema } from 'graphql-import'
import { makeExecutableSchema } from 'graphql-tools'
const typeDefs = importSchema('schema.graphql')
const resolvers = {}
const schema = makeExecutableSchema({ typeDefs, resolvers })
Assume the following directory structure:
.
├── a.graphql
├── b.graphql
└── c.graphql
a.graphql
# import B from "b.graphql"
type A {
# test 1
first: String
second: Float
b: B
}
b.graphql
# import C from 'c.graphql'
type B {
c: C
hello: String!
}
c.graphql
type C {
id: ID!
}
Running console.log(importSchema('a.graphql'))
procudes the following output:
type A {
first: String
second: Float
b: B
}
type B {
c: C
hello: String!
}
type C {
id: ID!
}
Please refer to src/index.test.ts
for more examples.
The implementation documentation documents how things are implemented under the hood. You can also use the VSCode test setup to debug your code/tests.
FAQs
[](https://circleci.com/gh/graphcool/graphql-import) [](https://badge.fury.io/js/graphql-import)
The npm package @volst/graphql-import receives a total of 1 weekly downloads. As such, @volst/graphql-import popularity was classified as not popular.
We found that @volst/graphql-import demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.