Socket
Socket
Sign inDemoInstall

graphql-schemax

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-schemax - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.0.9](https://github.com/nicolasdao/graphql-schemax/compare/v0.0.8...v0.0.9) (2021-11-07)
### Bug Fixes
* Nested complex objects are ignored ([b140f1c](https://github.com/nicolasdao/graphql-schemax/commit/b140f1cbee36d79a4ddb835575e7b2182251dbb2))
### [0.0.8](https://github.com/nicolasdao/graphql-schemax/compare/v0.0.7...v0.0.8) (2021-11-01)

@@ -7,0 +14,0 @@

2

package.json
{
"name": "graphql-schemax",
"version": "0.0.8",
"version": "0.0.9",
"description": "Creates GraphQL string schema from plain JSON objects.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -98,3 +98,7 @@ # GRAPHQL-SCHEMAX

> - [Required anonymous types](#required-anonymous-types)
> - [Required anonymous Type and Input](#required-anonymous-type-and-input)
> - [Required anonymous Enum](#required-anonymous-enum)
> - [Naming anonymous types](#naming-anonymous-types)
> - [Naming anonymous Type and Input](#naming-anonymous-type-and-input)
> - [Naming anonymous Enum](#naming-anonymous-enum)
> - [Directives](#directives)

@@ -307,2 +311,3 @@ > * [APIs](#apis)

## Required anonymous types
### Required anonymous Type and Input

@@ -350,3 +355,38 @@ Use the `__required` property as follow:

### Required anonymous Enum
To make an anonymous enum required, use the reserved `__required` string:
```js
const schema = [
'type Query', {
products:{ type:['car','home','furniture','__required'], ':':{ name:'String' } }
}
]
console.log(new Schemax(schema).toString())
```
```js
type Query {
products(type: Enum_11845869194!): Type_12078318863
}
enum Enum_11845869194 {
car
furniture
home
}
type Type_12078318863 {
name: String
}
schema {
query: Query
}
```
## Naming anonymous types
### Naming anonymous Type and Input

@@ -395,2 +435,36 @@ Use the `__name` property as follow:

### Naming anonymous Enum
To use a custom enum, use the reserved `__name:YOUR_NAME` string:
```js
const schema = [
'type Query', {
products:{ type:['car','home','furniture','__name:ProductTypeEnum'], ':':{ name:'String' } }
}
]
console.log(new Schemax(schema).toString())
```
```js
type Query {
products(type: ProductTypeEnum): Type_12078318863
}
enum ProductTypeEnum {
car
furniture
home
}
type Type_12078318863 {
name: String
}
schema {
query: Query
}
```
## Directives

@@ -397,0 +471,0 @@

Sorry, the diff of this file is not supported yet

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