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

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.10 to 0.0.11

7

CHANGELOG.md

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

### [0.0.11](https://github.com/nicolasdao/graphql-schemax/compare/v0.0.10...v0.0.11) (2021-11-13)
### Bug Fixes
* Arrays of Enums nested in objects are not serialized into arrays ([1c72fef](https://github.com/nicolasdao/graphql-schemax/commit/1c72fef8a748a948e6af955c19fa61928e8119f3))
### [0.0.10](https://github.com/nicolasdao/graphql-schemax/compare/v0.0.9...v0.0.10) (2021-11-07)

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

2

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

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

@@ -100,2 +100,3 @@ # GRAPHQL-SCHEMAX

> - [Required anonymous Enum](#required-anonymous-enum)
> - [Required non-empty anonymous array](#required-non-empty-anonymous-array)
> - [Naming anonymous types](#naming-anonymous-types)

@@ -368,2 +369,4 @@ > - [Naming anonymous Type and Input](#naming-anonymous-type-and-input)

Which outputs:
```js

@@ -389,2 +392,50 @@ type Query {

### Required non-empty anonymous array
Use the `__noempty` keyword to create enums similar to `[RoleEnum!]`.
```js
const schema = [
'type Mutation', {
invite: { users:[{
id:'ID',
email:'String',
roles:[['admin','writer','reader','__required','__noempty','__name:RoleEnum']],
__noempty:true,
__name:'UserInviteInput'
}], ':':{ message:'String', __name:'Message' } }
}
]
console.log(new Schemax(schema).toString())
```
Which outputs:
```js
type Mutation {
invite(users: [UserInviteInput!]): Message
}
enum RoleEnum {
admin
reader
writer
}
input UserInviteInput {
id: ID
email: String
roles: [RoleEnum!]!
}
type Message {
message: String
}
schema {
mutation: Mutation
}
```
## Naming anonymous types

@@ -391,0 +442,0 @@ ### Naming anonymous Type and Input

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