-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,063 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"namespace": "editor-integrations", | ||
"project": "basic", | ||
"version": "0.0.1", | ||
"typingsEnv": "node", | ||
"typingsHost": "http://localhost:8080/", | ||
"typingsDir": "./src", | ||
"backendSrc": "./src", | ||
"backendLib": "./lib", | ||
"schemaDir": "./", | ||
"integrationPath": "src/index.ts", | ||
"registry": "https://registry.npmjs.org/", | ||
"npmPackage": "gei-basic", | ||
"integrationName": "gei-basic", | ||
"projectVersion": "latest" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"arrowParens": "always", | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"tabWidth": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "gei-basic", | ||
"version": "0.1.0", | ||
"description": "Automatically generated by graphql-editor-cli", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "gecli dev", | ||
"build": "tsc", | ||
"watch": "tsc --watch", | ||
"update": "gecli schema && gecli typings", | ||
"temp-db": "docker run -p 27017:27017 --rm mongo", | ||
"integrate": "gecli gei integrate", | ||
"publish": "gecli gei publish" | ||
}, | ||
"author": "GraphQL Editor Centaur Generator", | ||
"license": "ISC", | ||
"type": "module", | ||
"devDependencies": { | ||
"@types/node": "^18.7.18", | ||
"@types/node-fetch": "^2.6.2", | ||
"@types/ws": "^8.5.4", | ||
"@typescript-eslint/eslint-plugin": "^5.38.0", | ||
"@typescript-eslint/parser": "^5.38.0", | ||
"eslint": "^8.23.1", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"prettier": "^2.7.1", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.8.3" | ||
}, | ||
"dependencies": { | ||
"node-fetch": "^3.2.10", | ||
"stucco-js": "^0.10.18", | ||
"ws": "^8.12.0", | ||
"graphql-editor-cli": "^0.7.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
type Query{ | ||
pipe: Query | ||
passSource: Query | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { FieldResolveInput } from 'stucco-js'; | ||
import { resolverFor } from '../zeus/index.js'; | ||
|
||
export const handler = async (input: FieldResolveInput) => | ||
resolverFor('Query', 'passSource', async () => { | ||
return input.source; | ||
})(input.arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { FieldResolveInput } from 'stucco-js'; | ||
import { resolverFor } from '../zeus/index.js'; | ||
|
||
export const handler = async (input: FieldResolveInput) => | ||
resolverFor('Query', 'pipe', async () => { | ||
return {}; | ||
})(input.arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { NewIntegration } from 'graphql-editor-cli'; | ||
|
||
import { handler as pipe } from './Query/pipe.js'; | ||
import { handler as passSource } from './Query/passSource.js'; | ||
|
||
export const integration = NewIntegration({ | ||
Query: { | ||
pipe: { | ||
name: 'Pipe resolver', | ||
description: 'Pass the resolver and go furhter', | ||
handler: pipe, | ||
}, | ||
passSource: { | ||
name: 'Pass the source resolver', | ||
description: 'Pass the resolver and go furhter. Pass the source to the next resolver', | ||
handler: passSource, | ||
}, | ||
}, | ||
}); | ||
|
||
export default integration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
type IntegrationData = { | ||
name: string; | ||
description: string; | ||
value: string | string[]; | ||
required?: boolean; | ||
}; | ||
|
||
type IntegrationSpecification = { | ||
[resolver: string]: { | ||
name: string; | ||
description: string; | ||
data: Record<string, IntegrationData>; | ||
resolve: { name: string }; | ||
}; | ||
}; | ||
|
||
// Declare your resolver specifications here to generate JSON from it later using `gei integrate` command | ||
const integration: IntegrationSpecification = { | ||
['Query.pipe']: { | ||
data: {}, | ||
description: 'Pass the resolver and go furhter', | ||
name: 'Pipe resolver', | ||
resolve: { | ||
name: 'lib/Query/pipe', | ||
}, | ||
}, | ||
['Query.passSource']: { | ||
data: {}, | ||
description: 'Pass the resolver and go furhter. Pass the source to the next resolver', | ||
name: 'Pass the source resolver', | ||
resolve: { | ||
name: 'lib/Query/passSource', | ||
}, | ||
}, | ||
}; | ||
|
||
export default integration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* eslint-disable */ | ||
|
||
export const AllTypesProps: Record<string,any> = { | ||
|
||
} | ||
|
||
export const ReturnTypes: Record<string,any> = { | ||
Query:{ | ||
pipe:"Query", | ||
passSource:"Query" | ||
} | ||
} | ||
|
||
export const Ops = { | ||
query: "Query" as const | ||
} |
Oops, something went wrong.