File tree Expand file tree Collapse file tree 13 files changed +1063
-0
lines changed
packages/integrations/gei-basic Expand file tree Collapse file tree 13 files changed +1063
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "extends": ["../../../.eslintrc"]
3
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "namespace" : " editor-integrations" ,
3
+ "project" : " basic" ,
4
+ "version" : " 0.0.1" ,
5
+ "typingsEnv" : " node" ,
6
+ "typingsHost" : " http://localhost:8080/" ,
7
+ "typingsDir" : " ./src" ,
8
+ "backendSrc" : " ./src" ,
9
+ "backendLib" : " ./lib" ,
10
+ "schemaDir" : " ./" ,
11
+ "integrationPath" : " src/index.ts" ,
12
+ "registry" : " https://registry.npmjs.org/" ,
13
+ "npmPackage" : " gei-basic" ,
14
+ "integrationName" : " gei-basic" ,
15
+ "projectVersion" : " latest"
16
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "arrowParens" : " always" ,
3
+ "semi" : true ,
4
+ "trailingComma" : " all" ,
5
+ "singleQuote" : true ,
6
+ "printWidth" : 120 ,
7
+ "tabWidth" : 2
8
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " gei-basic" ,
3
+ "version" : " 0.1.0" ,
4
+ "description" : " Automatically generated by graphql-editor-cli" ,
5
+ "main" : " index.js" ,
6
+ "scripts" : {
7
+ "start" : " gecli dev" ,
8
+ "build" : " tsc" ,
9
+ "watch" : " tsc --watch" ,
10
+ "update" : " gecli schema && gecli typings" ,
11
+ "temp-db" : " docker run -p 27017:27017 --rm mongo" ,
12
+ "integrate" : " gecli gei integrate" ,
13
+ "publish" : " gecli gei publish"
14
+ },
15
+ "author" : " GraphQL Editor Centaur Generator" ,
16
+ "license" : " ISC" ,
17
+ "type" : " module" ,
18
+ "devDependencies" : {
19
+ "@types/node" : " ^18.7.18" ,
20
+ "@types/node-fetch" : " ^2.6.2" ,
21
+ "@types/ws" : " ^8.5.4" ,
22
+ "@typescript-eslint/eslint-plugin" : " ^5.38.0" ,
23
+ "@typescript-eslint/parser" : " ^5.38.0" ,
24
+ "eslint" : " ^8.23.1" ,
25
+ "eslint-config-prettier" : " ^8.5.0" ,
26
+ "eslint-plugin-prettier" : " ^4.2.1" ,
27
+ "prettier" : " ^2.7.1" ,
28
+ "ts-node" : " ^10.9.1" ,
29
+ "typescript" : " ^4.8.3"
30
+ },
31
+ "dependencies" : {
32
+ "node-fetch" : " ^3.2.10" ,
33
+ "stucco-js" : " ^0.10.18" ,
34
+ "ws" : " ^8.12.0" ,
35
+ "graphql-editor-cli" : " ^0.7.6"
36
+ }
37
+ }
Original file line number Diff line number Diff line change
1
+
2
+
3
+ type Query {
4
+ pipe : Query
5
+ passSource : Query
6
+ }
Original file line number Diff line number Diff line change
1
+ import { FieldResolveInput } from 'stucco-js' ;
2
+ import { resolverFor } from '../zeus/index.js' ;
3
+
4
+ export const handler = async ( input : FieldResolveInput ) =>
5
+ resolverFor ( 'Query' , 'passSource' , async ( ) => {
6
+ return input . source ;
7
+ } ) ( input . arguments ) ;
Original file line number Diff line number Diff line change
1
+ import { FieldResolveInput } from 'stucco-js' ;
2
+ import { resolverFor } from '../zeus/index.js' ;
3
+
4
+ export const handler = async ( input : FieldResolveInput ) =>
5
+ resolverFor ( 'Query' , 'pipe' , async ( ) => {
6
+ return { } ;
7
+ } ) ( input . arguments ) ;
Original file line number Diff line number Diff line change
1
+ import { NewIntegration } from 'graphql-editor-cli' ;
2
+
3
+ import { handler as pipe } from './Query/pipe.js' ;
4
+ import { handler as passSource } from './Query/passSource.js' ;
5
+
6
+ export const integration = NewIntegration ( {
7
+ Query : {
8
+ pipe : {
9
+ name : 'Pipe resolver' ,
10
+ description : 'Pass the resolver and go furhter' ,
11
+ handler : pipe ,
12
+ } ,
13
+ passSource : {
14
+ name : 'Pass the source resolver' ,
15
+ description : 'Pass the resolver and go furhter. Pass the source to the next resolver' ,
16
+ handler : passSource ,
17
+ } ,
18
+ } ,
19
+ } ) ;
20
+
21
+ export default integration ;
Original file line number Diff line number Diff line change
1
+ type IntegrationData = {
2
+ name : string ;
3
+ description : string ;
4
+ value : string | string [ ] ;
5
+ required ?: boolean ;
6
+ } ;
7
+
8
+ type IntegrationSpecification = {
9
+ [ resolver : string ] : {
10
+ name : string ;
11
+ description : string ;
12
+ data : Record < string , IntegrationData > ;
13
+ resolve : { name : string } ;
14
+ } ;
15
+ } ;
16
+
17
+ // Declare your resolver specifications here to generate JSON from it later using `gei integrate` command
18
+ const integration : IntegrationSpecification = {
19
+ [ 'Query.pipe' ] : {
20
+ data : { } ,
21
+ description : 'Pass the resolver and go furhter' ,
22
+ name : 'Pipe resolver' ,
23
+ resolve : {
24
+ name : 'lib/Query/pipe' ,
25
+ } ,
26
+ } ,
27
+ [ 'Query.passSource' ] : {
28
+ data : { } ,
29
+ description : 'Pass the resolver and go furhter. Pass the source to the next resolver' ,
30
+ name : 'Pass the source resolver' ,
31
+ resolve : {
32
+ name : 'lib/Query/passSource' ,
33
+ } ,
34
+ } ,
35
+ } ;
36
+
37
+ export default integration ;
Original file line number Diff line number Diff line change
1
+ /* eslint-disable */
2
+
3
+ export const AllTypesProps : Record < string , any > = {
4
+
5
+ }
6
+
7
+ export const ReturnTypes : Record < string , any > = {
8
+ Query :{
9
+ pipe :"Query" ,
10
+ passSource :"Query"
11
+ }
12
+ }
13
+
14
+ export const Ops = {
15
+ query : "Query" as const
16
+ }
You can’t perform that action at this time.
0 commit comments