Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-graphql-partialable

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-graphql-partialable

egg graphql plugin

  • 2.6.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

egg-graphql-partialable


fork 自 egg-graphql,npm包名更换为egg-graphql-partialable,使用方法与egg-graphql保持一致

egg-graphq的基础上添加了以下功能:

  1. 添加 #import 指令的支持,以支持文件拆分功能,详见下文
  2. 添加代码编译报错提示(精确到行列),帮助你迅速找到grahql错误文件位置
  3. 解决了对graphql及graphql-tools版本依赖过旧带来的问题。

#import指令使用方式

目录结构如下:

  • src
    • user
      • schema.graphql
      • user.graphql
      • extFields.graphql

文件内容如下:

# schema.graphql
#import ./user.graphql

type Query {
  user(id: Int!): User!
}
# user.graphql
type User {
  name: String!
  age: Int!
  password: String
  #import ./extFields.graphql
}
# extFields.graphql
enabled: Boolean!
createAt: Date!
updateAt: Date!

编译后结果:

type User {
  name: String!
  age: Int!
  password: String
  enabled: Boolean!
  createAt: Date!
  updateAt: Date!
}

type Query {
  user(id: Int!): User!
}

Keywords

FAQs

Package last updated on 07 Jan 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc