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

@platformatic/sql-graphql

Package Overview
Dependencies
Maintainers
6
Versions
285
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/sql-graphql - npm Package Compare versions

Comparing version 0.20.1 to 0.21.0

test/or.test.js

44

lib/entity-to-type.js

@@ -102,23 +102,35 @@ 'use strict'

const whereFields = Object.keys(fields).reduce((acc, field) => {
acc[field] = {
type: new graphql.GraphQLInputObjectType({
name: `${entityName}WhereArguments${field}`,
fields: {
eq: { type: fields[field].type },
neq: { type: fields[field].type },
gt: { type: fields[field].type },
gte: { type: fields[field].type },
lt: { type: fields[field].type },
lte: { type: fields[field].type },
like: { type: fields[field].type },
in: { type: new graphql.GraphQLList(fields[field].type) },
nin: { type: new graphql.GraphQLList(fields[field].type) }
}
})
}
return acc
}, {})
const whereArgType = new graphql.GraphQLInputObjectType({
name: `${entityName}WhereArguments`,
fields: Object.keys(fields).reduce((acc, field) => {
acc[field] = {
type: new graphql.GraphQLInputObjectType({
name: `${entityName}WhereArguments${field}`,
fields: {
...whereFields,
or: {
type: new graphql.GraphQLList(new graphql.GraphQLInputObjectType({
name: `${entityName}WhereArgumentsOr`,
fields: {
eq: { type: fields[field].type },
neq: { type: fields[field].type },
gt: { type: fields[field].type },
gte: { type: fields[field].type },
lt: { type: fields[field].type },
lte: { type: fields[field].type },
like: { type: fields[field].type },
in: { type: new graphql.GraphQLList(fields[field].type) },
nin: { type: new graphql.GraphQLList(fields[field].type) }
...whereFields
}
})
}))
}
return acc
}, {})
}
})

@@ -125,0 +137,0 @@

@@ -22,3 +22,3 @@ 'use strict'

case 'decimal':
return graphql.GraphQLInt
return graphql.GraphQLString
case 'bigint':

@@ -47,3 +47,3 @@ return graphql.GraphQLString

case 'numeric':
return graphql.GraphQLFloat
return graphql.GraphQLString
case 'float4':

@@ -50,0 +50,0 @@ return graphql.GraphQLFloat

{
"name": "@platformatic/sql-graphql",
"version": "0.20.1",
"version": "0.21.0",
"description": "Map SQL dbs to GraphQL",

@@ -24,4 +24,4 @@ "main": "index.js",

"ws": "^8.12.1",
"@platformatic/sql-events": "0.20.1",
"@platformatic/sql-mapper": "0.20.1"
"@platformatic/sql-events": "0.21.0",
"@platformatic/sql-mapper": "0.21.0"
},

@@ -28,0 +28,0 @@ "dependencies": {

@@ -61,3 +61,3 @@ 'use strict'

aSmallint: 42,
aDecimal: 42,
aDecimal: "42",
anEnum: value1

@@ -96,3 +96,3 @@ }) {

aSmallint: 42,
aDecimal: 42,
aDecimal: '42',
anEnum: 'value1'

@@ -308,3 +308,3 @@ }

aSmallint: 42,
aDecimal: 42,
aDecimal: "42",
anEnum: value1

@@ -343,3 +343,3 @@ }) {

aSmallint: 42,
aDecimal: 42,
aDecimal: '42',
anEnum: 'value1'

@@ -390,3 +390,3 @@ }

aSmallint: 42,
aDecimal: 42,
aDecimal: '42',
anEnum: 'value1'

@@ -554,3 +554,3 @@ }

aSmallint: 42,
aDecimal: 42 }) {
aDecimal: "42" }) {
id

@@ -582,3 +582,3 @@ published

aSmallint: 42,
aDecimal: 42
aDecimal: '42'
}

@@ -623,3 +623,3 @@ }

aSmallint: 42,
aDecimal: 42
aDecimal: '42'
}

@@ -626,0 +626,0 @@ }

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