-
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.
✨ add possibility to overrides docker image with plugins and transforms
- Loading branch information
Mbaye THIAM
committed
Apr 5, 2024
1 parent
2cb5186
commit ad90e45
Showing
23 changed files
with
314 additions
and
48 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,21 +1,29 @@ | ||
import type { Config } from '@graphql-mesh/types/typings/config' | ||
import { YamlConfig } from '@graphql-mesh/types' | ||
import ConfigFromSwaggers from './utils/ConfigFromSwaggers' | ||
|
||
const configFromSwaggers = new ConfigFromSwaggers() | ||
const { defaultConfig, additionalResolvers, additionalTypeDefs, sources } = | ||
const { defaultConfig, additionalTypeDefs, sources } = | ||
configFromSwaggers.getMeshConfigFromSwaggers() | ||
|
||
const config = <Config>{ | ||
const config = <YamlConfig.Config>{ | ||
...defaultConfig, | ||
transforms: [ | ||
{ 'directive-spl': {} }, | ||
{ 'directive-headers': {} }, | ||
{ 'directive-no-auth': {} }, | ||
{ | ||
'inject-additional-transforms': { | ||
additionalTransforms: defaultConfig.additionalTransforms || [] | ||
} | ||
}, | ||
...(defaultConfig.transforms || []) | ||
], | ||
sources: [...sources], | ||
additionalTypeDefs: [...(defaultConfig.additionalTypeDefs || []), ...additionalTypeDefs], | ||
additionalResolvers: [...(defaultConfig.additionalResolvers || []), additionalResolvers] | ||
additionalTypeDefs: [defaultConfig.additionalTypeDefs || '', ...additionalTypeDefs], | ||
additionalResolvers: [ | ||
...(defaultConfig.additionalResolvers || []), | ||
'./utils/additionalResolvers.ts' | ||
] | ||
} | ||
|
||
export default config |
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
Empty file.
Binary file modified
BIN
-96 Bytes
(96%)
packages/graphql-mesh/local-pkg/directive-no-auth-1.0.0.tgz
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,11 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Copy parent patches to the docker context | ||
cp -r ../../patches/* ./patches | ||
# build the docker image | ||
docker build -t graphql-mesh . | ||
# Remove the patches from the docker context | ||
rm -rf patches/@graphql-tools+batch-execute+9.0.2.patch patches/@graphql-tools+executor+1.2.0.patch patches/graphql+16.8.1.patch | ||
|
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
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
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
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 @@ | ||
import ConfigFromSwaggers from './ConfigFromSwaggers' | ||
|
||
const configFromSwaggers = new ConfigFromSwaggers() | ||
const { additionalResolvers } = configFromSwaggers.getMeshConfigFromSwaggers() | ||
|
||
export default additionalResolvers |
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
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
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 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
node_modules | ||
_build | ||
.DS_Store |
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": "inject-additional-transforms", | ||
"version": "1.0.0", | ||
"type": "module", | ||
"main": "_build/cjs/index.js", | ||
"module": "_build/esm/index.js", | ||
"types": "_build/esm/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./_build/esm/index.js", | ||
"require": "./_build/cjs/index.js" | ||
} | ||
}, | ||
"files": [ | ||
"_build/**/*" | ||
], | ||
"scripts": { | ||
"build:cjs": "tsc --project tsconfig-cjs.json", | ||
"build:esm": "tsc --project tsconfig-esm.json", | ||
"build": "rm -rf _build && npm run build:esm && npm run build:cjs && node ./scripts/prepare-package-json", | ||
"pack": "npm run build && npm pack --pack-destination ../graphql-mesh/local-pkg" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.11.19", | ||
"tslib": "^2.6.2", | ||
"typescript": "^5.2.2" | ||
}, | ||
"peerDependencies": { | ||
"@graphql-mesh/types": "*", | ||
"@graphql-tools/utils": "*", | ||
"@graphql-mesh/utils": "*", | ||
"graphql": "*" | ||
}, | ||
"dependencies": { | ||
"@graphql-tools/delegate": "^10.0.0" | ||
} | ||
} |
Oops, something went wrong.