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

apiql

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apiql

对graphql的语法扩展,在graphql的语法基础上增加了 继承和泛型,语法基本和graphql保持一致,有部分修改

  • 1.0.2
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

apiql

对graphql的语法扩展,在graphql的语法基础上增加了 继承和泛型,语法基本和graphql保持一致,有部分修改

继承示例

type UserBaseInfo{
	id:ID!
	name:String!
	gender:String!
}

type Administrator extends UserBaseInfo{
	number:String!
	password:String
}

泛型示例

type Paged<T> {
	count:Int!
	pageSize:Int!
	page:Int!
	datas:[T!]
}

type Query{
	users(page:Int!, pageSize:Int!): Paged<User>
	movies(page:Int!, pageSize:Int!): Paged<Movie>
}

查询简化

# 类型可以忽略
query getUsers($page){
   #同名的可以不用写名称
   users(page, pageSize:20){
      count
      datas{
         id
         name
      }
   }
}

FAQs

Package last updated on 11 Mar 2019

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