Socket
Socket
Sign inDemoInstall

require-graphql-file

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    require-graphql-file

Simple package to import .graphql files to being able to write them with syntax highlighting.


Version published
Weekly downloads
44
decreased by-77.66%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

require-graphql-file

Simple package to import .graphql files to being able to write them with syntax highlighting.

Installation

Via npm:

$ npm install --save require-graphql-file

Get started

Just require the .graphql file and use it like a normal string.

const requireGraphQLFile = require('require-graphql-file');

// the file is 'schema.graphql' but you can avoid to type the extension
const typeDefs = requireGraphQLFile('./schema');

// then use the schema as usual
// like in this example with Apollo
exports.schema = makeExecutableSchema({
  typeDefs,
  resolvers,
});

License

MIT ©️ Federico Moretti

Keywords

FAQs

Last updated on 30 Jan 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc