graphql-genie
Advanced tools
Comparing version 0.2.13 to 0.2.14
@@ -163,2 +163,4 @@ ### GraphQLGenie API | ||
Note that when using fortune hooks the resolvers context and info arguments can be had at context.request.meta.context and context.request.meta.info | ||
```typescript | ||
@@ -165,0 +167,0 @@ interface DataResolverInputHook { |
@@ -19,3 +19,3 @@ import { IntrospectionType } from 'graphql'; | ||
constructor(fortuneOptions: FortuneOptions, schemaInfo: IntrospectionType[]); | ||
computeId: (graphType: string) => any; | ||
computeId: (graphType: string, id?: any) => any; | ||
private getTypeFromId; | ||
@@ -22,0 +22,0 @@ getValueByUnique: (returnTypeName: string, args: any, meta: any) => Promise<Object>; |
@@ -17,4 +17,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
constructor(fortuneOptions, schemaInfo) { | ||
this.computeId = (graphType) => { | ||
const id = fortuneCommon.generateId(); | ||
this.computeId = (graphType, id) => { | ||
id = id || fortuneCommon.generateId(); | ||
return btoa(`${id}:${graphType}`); | ||
@@ -21,0 +21,0 @@ }; |
{ | ||
"name": "graphql-genie", | ||
"version": "0.2.13", | ||
"version": "0.2.14", | ||
"description": "GraphQL Genie", | ||
@@ -5,0 +5,0 @@ "browser": "./lib/browser.umd.js", |
@@ -18,3 +18,3 @@ <h1 align="center"> | ||
Or for a server demo see the [graphql yoga redis example](https://github.com/genie-team/graphql-genie/tree/master/examples/graphql-yoga-redis) (no external db setup required as it uses a mock redis) or [graphql yoga postgres example](https://github.com/genie-team/graphql-genie/tree/master/examples/graphql-yoga-postgresql) | ||
Or for a server demo see the [graphql yoga redis example](https://github.com/genie-team/graphql-genie/tree/master/examples/graphql-yoga-redis-authentication) (no external db setup required as it uses a mock redis) or [graphql yoga postgres example](https://github.com/genie-team/graphql-genie/tree/master/examples/graphql-yoga-postgresql) | ||
@@ -21,0 +21,0 @@ ### Installation |
@@ -38,4 +38,4 @@ import { atob, btoa } from 'abab'; | ||
public computeId = (graphType: string) => { | ||
const id = fortuneCommon.generateId(); | ||
public computeId = (graphType: string, id?) => { | ||
id = id || fortuneCommon.generateId(); | ||
return btoa(`${id}:${graphType}`); | ||
@@ -42,0 +42,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
946741