@kube/vgql-core
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -107,3 +107,4 @@ import * as Structype from '@kube/vgql-structype'; | ||
declare function VirtualState<S extends SchemaDefinition>(_schema: S): (input: Input<S>) => Input<S>; | ||
type VirtualState<S extends SchemaDefinition> = Input<S>; | ||
declare function VirtualState<S extends SchemaDefinition>(_schema: S): (input: Input<S>) => VirtualState<S>; | ||
declare namespace VirtualState { | ||
@@ -110,0 +111,0 @@ var from: <S extends SchemaDefinition>(baseState: Input<S>) => (state: Input<S>) => Input<S>; |
@@ -141,3 +141,2 @@ // src/index.ts | ||
))[0]; | ||
console.log("ID ARG NAME", idArgName); | ||
let x = typeSchema.value.returns; | ||
@@ -160,8 +159,5 @@ let nullable = false; | ||
const idToFind = uuidTransform(args[idArgName], x.name); | ||
console.log("ID TO FIND", idToFind); | ||
console.log("STORE CONTENT:", context.store[returnTypeName]); | ||
const match = context.store[returnTypeName].find( | ||
(_) => _.id === idToFind | ||
); | ||
console.log("MATCH", returnTypeName, match); | ||
return match ?? (nullable ? null : getDefaultValueFromTypeSchema(typeSchema)); | ||
@@ -168,0 +164,0 @@ } else { |
{ | ||
"name": "@kube/vgql-core", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"author": "Chris Feijoo", | ||
@@ -18,4 +18,4 @@ "license": "MIT", | ||
"uuid": "^9.0.1", | ||
"@kube/vgql-hkt": "0.0.4", | ||
"@kube/vgql-structype": "0.0.4" | ||
"@kube/vgql-hkt": "0.0.5", | ||
"@kube/vgql-structype": "0.0.5" | ||
}, | ||
@@ -22,0 +22,0 @@ "devDependencies": { |
@@ -129,3 +129,3 @@ import { | ||
console.log("ID ARG NAME", idArgName); | ||
// console.log("ID ARG NAME", idArgName); | ||
@@ -158,4 +158,4 @@ let x = typeSchema.value.returns; | ||
console.log("ID TO FIND", idToFind); | ||
console.log("STORE CONTENT:", context.store[returnTypeName]); | ||
// console.log("ID TO FIND", idToFind); | ||
// console.log("STORE CONTENT:", context.store[returnTypeName]); | ||
@@ -166,3 +166,3 @@ const match = context.store[returnTypeName].find( | ||
console.log("MATCH", returnTypeName, match); | ||
// console.log("MATCH", returnTypeName, match); | ||
@@ -169,0 +169,0 @@ return ( |
@@ -7,4 +7,6 @@ import type { SchemaDefinition } from "@kube/vgql-structype"; | ||
export type VirtualState<S extends SchemaDefinition> = Input<S>; | ||
export function VirtualState<S extends SchemaDefinition>(_schema: S) { | ||
return (input: Input<S>): Input<S> => input; | ||
return (input: Input<S>): VirtualState<S> => input; | ||
} | ||
@@ -11,0 +13,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87291
1600
+ Added@kube/vgql-hkt@0.0.5(transitive)
+ Added@kube/vgql-structype@0.0.5(transitive)
- Removed@kube/vgql-hkt@0.0.4(transitive)
- Removed@kube/vgql-structype@0.0.4(transitive)
Updated@kube/vgql-hkt@0.0.5
Updated@kube/vgql-structype@0.0.5