diff --git a/.changeset/clever-walls-press.md b/.changeset/clever-walls-press.md
new file mode 100644
index 0000000000000..9e3ba4e9a09e1
--- /dev/null
+++ b/.changeset/clever-walls-press.md
@@ -0,0 +1,81 @@
+---
+'frontend': patch
+'@graphql-mesh/plugin-operation-field-permissions': patch
+'@graphql-mesh/transform-resolvers-composition': patch
+'@graphql-mesh/plugin-http-details-extensions': patch
+'odata-msgraph-programmatic-ts': patch
+'type-merging-batching-example': patch
+'authors-service': patch
+'@graphql-mesh/transform-naming-convention': patch
+'graphql-file-upload-example': patch
+'@graphql-mesh/plugin-deduplicate-request': patch
+'odata-msgraph-programmatic': patch
+'json-schema-subscriptions': patch
+'typescript-location-weather-example': patch
+'openapi-react-weatherbit': patch
+'@graphql-mesh/transform-filter-schema': patch
+'@graphql-mesh/transform-replace-field': patch
+'javascript-wiki': patch
+'@graphql-mesh/transform-type-merging': patch
+'@graphql-mesh/plugin-response-cache': patch
+'@graphql-mesh/transform-encapsulate': patch
+'@graphql-mesh/transform-hoist-field': patch
+'nextjs-apollo-example': patch
+'openapi-stackexchange': patch
+'openapi-subscriptions': patch
+'@graphql-mesh/postgraphile': patch
+'@graphql-mesh/transform-federation': patch
+'@graphql-mesh/transform-rate-limit': patch
+'@graphql-mesh/string-interpolation': patch
+'@omnigraph/json-schema': patch
+'nextjs-sdk-example': patch
+'@graphql-mesh/merger-federation': patch
+'@graphql-mesh/plugin-http-cache': patch
+'@graphql-mesh/plugin-live-query': patch
+'@graphql-mesh/plugin-prometheus': patch
+'covid-mesh': patch
+'openwhisk-example': patch
+'country-info-example': patch
+'thrift-calculator': patch
+'@graphql-mesh/cache-localforage': patch
+'@graphql-mesh/transform-extend': patch
+'@graphql-mesh/transform-prefix': patch
+'@graphql-mesh/transform-rename': patch
+'mongoose-example': patch
+'openapi-youtrack': patch
+'@graphql-mesh/graphql': patch
+'@graphql-mesh/plugin-snapshot': patch
+'mysql-employees': patch
+'odata-microsoft-graph-example': patch
+'@graphql-mesh/thrift': patch
+'@omnigraph/openapi': patch
+'@graphql-mesh/transform-hive': patch
+'postgres-geodb-example': patch
+'chinook': patch
+'@graphql-mesh/mysql': patch
+'@graphql-mesh/plugin-statsd': patch
+'odata-trippin-example': patch
+'@graphql-mesh/cross-helpers': patch
+'@graphql-mesh/soap': patch
+'@graphql-mesh/tuql': patch
+'@graphql-mesh/jit-executor': patch
+'json-machete': patch
+'@omnigraph/raml': patch
+'@omnigraph/soap': patch
+'@graphql-mesh/merger-bare': patch
+'@graphql-mesh/plugin-hive': patch
+'@graphql-mesh/plugin-mock': patch
+'@graphql-mesh/apollo-link': patch
+'@graphql-mesh/cache-redis': patch
+'mysql-rfam': patch
+'@graphql-mesh/runtime': patch
+'@graphql-mesh/config': patch
+'auth0-example': patch
+'@graphql-mesh/store': patch
+'@graphql-mesh/types': patch
+'@graphql-mesh/utils': patch
+'@graphql-mesh/urql-exchange': patch
+'@graphql-mesh/cli': patch
+---
+
+Prettier fixes
diff --git a/.eslintrc.json b/.eslintrc.json
index 094adbf9908a9..bfe9904ae1633 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -3,7 +3,12 @@
"parserOptions": {
"project": "./tsconfig.json"
},
- "extends": ["eslint:recommended", "standard", "prettier", "plugin:@typescript-eslint/recommended"],
+ "extends": [
+ "eslint:recommended",
+ "standard",
+ "prettier",
+ "plugin:@typescript-eslint/recommended"
+ ],
"plugins": ["@typescript-eslint"],
"rules": {
"no-empty": "off",
@@ -28,7 +33,10 @@
"import/no-nodejs-modules": "error",
"no-eval": "off",
"no-use-before-define": "off",
- "import/no-extraneous-dependencies": ["error", { "devDependencies": ["**/*.test.ts", "**/*.spec.ts"] }]
+ "import/no-extraneous-dependencies": [
+ "error",
+ { "devDependencies": ["**/*.test.ts", "**/*.spec.ts"] }
+ ]
},
"env": {
"es6": true,
@@ -45,7 +53,7 @@
}
}
],
- "ignorePatterns": ["dist", "node_modules", "examples", "website", "scripts"],
+ "ignorePatterns": ["dist", "node_modules", "examples", "website", "scripts", ".bob"],
"globals": {
"BigInt": true
}
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 9e537b877fc8c..8c6d4d128e721 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -7,9 +7,14 @@ about: Create a bug report to help us improve
-_Progress of the issue based on the [Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow)_
+_Progress of the issue based on the
+[Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow)_
-- [ ] 1. The issue provides a reproduction available on [Github](https://github.com/Urigo/graphql-mesh/tree/master/examples/hello-world), [Stackblitz](https://stackblitz.com/github/Urigo/graphql-mesh/tree/master/examples/hello-world) or [CodeSandbox](https://codesandbox.io/s/github/Urigo/graphql-mesh/tree/master/examples/hello-world)
+- [ ] 1. The issue provides a reproduction available on
+ [Github](https://github.com/Urigo/graphql-mesh/tree/master/examples/hello-world),
+ [Stackblitz](https://stackblitz.com/github/Urigo/graphql-mesh/tree/master/examples/hello-world)
+ or
+ [CodeSandbox](https://codesandbox.io/s/github/Urigo/graphql-mesh/tree/master/examples/hello-world)
> Make sure to fork this template and run `yarn generate` in the terminal.
>
@@ -25,8 +30,7 @@ _Progress of the issue based on the [Contributor Workflow](https://github.com/th
-**To Reproduce**
-Steps to reproduce the behavior:
+**To Reproduce** Steps to reproduce the behavior:
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 4867decdecd16..aae65e0b8bfc3 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -2,4 +2,6 @@ blank_issues_enabled: false
contact_links:
- name: Have a question?
url: https://github.com/Urigo/graphql-mesh/discussions/new
- about: Not sure about something? need help from the community? have a question to our team? please ask and answer questions here.
+ about:
+ Not sure about something? need help from the community? have a question to our team? please
+ ask and answer questions here.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 40f0b1feaef8b..8995e4493728e 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,10 +1,12 @@
🚨 **IMPORTANT: Please do not create a Pull Request without creating an issue first.**
-_Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request._
+_Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of
+the pull request._
## Description
-Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
+Please include a summary of the change and which issue is fixed. Please also include relevant
+motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
@@ -14,16 +16,19 @@ Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
-- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
+- [ ] Breaking change (fix or feature that would cause existing functionality to not work as
+ expected)
- [ ] This change requires a documentation update
## Screenshots/Sandbox (if appropriate/relevant):
-Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate
+Adding links to sandbox or providing screenshots can help us understand more about this PR and take
+action on it as appropriate
## How Has This Been Tested?
-Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
+Please describe the tests that you ran to verify your changes. Provide instructions so we can
+reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
@@ -36,7 +41,9 @@ Please describe the tests that you ran to verify your changes. Provide instructi
## Checklist:
-- [ ] I have followed the [CONTRIBUTING](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) doc and the style guidelines of this project
+- [ ] I have followed the
+ [CONTRIBUTING](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) doc and the
+ style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
@@ -47,4 +54,5 @@ Please describe the tests that you ran to verify your changes. Provide instructi
## Further comments
-If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
+If this is a relatively large or complex change, kick off the discussion by explaining why you chose
+the solution you did and what alternatives you considered, etc...
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 0b288c4672cc8..4a4a341456a81 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -15,6 +15,13 @@ jobs:
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
+ prettier:
+ uses: the-guild-org/shared-config/.github/workflows/prettier.yml@main
+ with:
+ script: yarn ci:prettier
+ secrets:
+ githubToken: ${{ secrets.GITHUB_TOKEN }}
+
test:
name: ${{matrix.os}} / node ${{matrix.node-version}}
timeout-minutes: 60
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
index 8c3deb3a0d806..f318594d92914 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/website.yml
@@ -11,7 +11,9 @@ on:
jobs:
deployment:
runs-on: ubuntu-latest
- if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
+ if:
+ github.event.pull_request.head.repo.full_name == github.repository || github.event_name ==
+ 'push'
steps:
- name: checkout
uses: actions/checkout@v3
@@ -28,7 +30,8 @@ jobs:
name: build and deploy website
env:
NEXT_BASE_PATH: ${{ github.ref == 'refs/heads/master' && '/graphql/mesh' || '' }}
- SITE_URL: ${{ github.ref == 'refs/heads/master' && 'https://the-guild.dev/graphql/mesh' || '' }}
+ SITE_URL:
+ ${{ github.ref == 'refs/heads/master' && 'https://the-guild.dev/graphql/mesh' || '' }}
NEXT_PUBLIC_ALGOLIA_INDEX_NAME: ${{ secrets.NEXT_PUBLIC_ALGOLIA_INDEX_NAME }}
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY }}
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
diff --git a/.husky/pre-commit b/.husky/pre-commit
index d2ae35e84b09c..51dcfe62ac988 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
+yarn pretty-quick --staged
yarn lint-staged
diff --git a/.prettierignore b/.prettierignore
index 21992fe293982..63ded79da74a4 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -5,3 +5,4 @@
dist/
.mesh/
/.husky/_/
+.bob/
diff --git a/README.md b/README.md
index 7fd3af965de60..4744fef3f78f1 100644
--- a/README.md
+++ b/README.md
@@ -7,16 +7,24 @@
https://www.graphql-mesh.com
-GraphQL Mesh allows you to use GraphQL query language to access data in remote APIs that don't run GraphQL (and also ones that do run GraphQL).
-It can be used as a gateway to other services or run as a local GraphQL schema that aggregates data from remote APIs.
+GraphQL Mesh allows you to use GraphQL query language to access data in remote APIs that don't run
+GraphQL (and also ones that do run GraphQL). It can be used as a gateway to other services or run as
+a local GraphQL schema that aggregates data from remote APIs.
-The goal of GraphQL Mesh is to let developers easily access services that are written in other APIs specs (such as gRPC, OpenAPI/Swagger, OData, SOAP/WSDL, Apache Thrift, Mongoose, PostgreSQL, Neo4j, and also GraphQL) with GraphQL queries and mutations.
+The goal of GraphQL Mesh is to let developers easily access services that are written in other APIs
+specs (such as gRPC, OpenAPI/Swagger, OData, SOAP/WSDL, Apache Thrift, Mongoose, PostgreSQL, Neo4j,
+and also GraphQL) with GraphQL queries and mutations.
-GraphQL Mesh gives the developer the ability to modify the output schemas, link types across schemas and merge schema types. You can even add custom GraphQL types and resolvers that fit your needs.
+GraphQL Mesh gives the developer the ability to modify the output schemas, link types across schemas
+and merge schema types. You can even add custom GraphQL types and resolvers that fit your needs.
-It allows developers to control the way they fetch data, and overcome issues related to backend implementation, legacy API services, chosen schema specification and non-typed APIs.
+It allows developers to control the way they fetch data, and overcome issues related to backend
+implementation, legacy API services, chosen schema specification and non-typed APIs.
-GraphQL Mesh is acting as a proxy to your data, and uses common libraries to wrap your existing API services. You can use this proxy locally in your service or application by running the GraphQL schema locally (with GraphQL `execute`), or you can deploy this as a gateway layer to your internal service.
+GraphQL Mesh is acting as a proxy to your data, and uses common libraries to wrap your existing API
+services. You can use this proxy locally in your service or application by running the GraphQL
+schema locally (with GraphQL `execute`), or you can deploy this as a gateway layer to your internal
+service.
## How does it work?
@@ -42,7 +50,8 @@ To get started with the basics, install the following:
$ yarn add graphql @graphql-mesh/runtime @graphql-mesh/cli
```
-Then, you need to install a Mesh handler, according to your API needs. You can see the list of all available built-in handlers in this README, under the `Supported APIs` section.
+Then, you need to install a Mesh handler, according to your API needs. You can see the list of all
+available built-in handlers in this README, under the `Supported APIs` section.
For example, if you wish to use OpenAPI handler, install the handler that matches your needs:
@@ -63,13 +72,18 @@ Then, this handler will be available for you to use in your config file.
## Contributions
-Contributions, issues and feature requests are very welcome. If you are using this package and fixed a bug for yourself, please consider submitting a PR!
+Contributions, issues and feature requests are very welcome. If you are using this package and fixed
+a bug for yourself, please consider submitting a PR!
-And if this is your first time contributing to this project, please do read our [Contributor Workflow Guide](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) before you get started off.
+And if this is your first time contributing to this project, please do read our
+[Contributor Workflow Guide](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md)
+before you get started off.
### Code of Conduct
-Help us keep GraphQL Mesh open and inclusive. Please read and follow our [Code of Conduct](https://github.com/the-guild-org/Stack/blob/master/CODE_OF_CONDUCT.md) as adopted from [Contributor Covenant](https://www.contributor-covenant.org/)
+Help us keep GraphQL Mesh open and inclusive. Please read and follow our
+[Code of Conduct](https://github.com/the-guild-org/Stack/blob/master/CODE_OF_CONDUCT.md) as adopted
+from [Contributor Covenant](https://www.contributor-covenant.org/)
### License
diff --git a/examples/auth0/privateAPI.ts b/examples/auth0/privateAPI.ts
index 50451e5fea05f..c1b6fd89d9b95 100644
--- a/examples/auth0/privateAPI.ts
+++ b/examples/auth0/privateAPI.ts
@@ -7,7 +7,7 @@ http
JSON.stringify({
code: 'I am a secret code',
timestamp: Date.now(),
- })
+ }),
);
})
.listen(3001, 'localhost', () => {
diff --git a/examples/graphql-file-upload-example/frontend/README.md b/examples/graphql-file-upload-example/frontend/README.md
index 02aac3f6ea17c..a460c41225704 100644
--- a/examples/graphql-file-upload-example/frontend/README.md
+++ b/examples/graphql-file-upload-example/frontend/README.md
@@ -17,7 +17,8 @@ You will also see any lint errors in the console.
### `yarn test`
Launches the test runner in the interactive watch mode.\
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests)
+for more information.
### `yarn build`
@@ -27,44 +28,58 @@ It correctly bundles React in production mode and optimizes the build for the be
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
-See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
+See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for
+more information.
### `yarn eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
-If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
+If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time.
+This command will remove the single build dependency from your project.
-Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
+Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel,
+ESLint, etc) right into your project so you have full control over them. All of the commands except
+`eject` will still work, but they will point to the copied scripts so you can tweak them. At this
+point you’re on your own.
-You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
+You don’t have to ever use `eject`. The curated feature set is suitable for small and middle
+deployments, and you shouldn’t feel obligated to use this feature. However we understand that this
+tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
-You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
+You can learn more in the
+[Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
-This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
+This section has moved here:
+[https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
-This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
+This section has moved here:
+[https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
-This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
+This section has moved here:
+[https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
-This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
+This section has moved here:
+[https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
-This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
+This section has moved here:
+[https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `yarn build` fails to minify
-This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
+This section has moved here:
+[https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
diff --git a/examples/graphql-file-upload-example/frontend/src/index.css b/examples/graphql-file-upload-example/frontend/src/index.css
index 7323ae85c542d..89e57c7ccfe1f 100644
--- a/examples/graphql-file-upload-example/frontend/src/index.css
+++ b/examples/graphql-file-upload-example/frontend/src/index.css
@@ -1,7 +1,7 @@
body {
margin: 0;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
- 'Droid Sans', 'Helvetica Neue', sans-serif;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
+ 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
diff --git a/examples/graphql-file-upload-example/frontend/src/index.tsx b/examples/graphql-file-upload-example/frontend/src/index.tsx
index ef2edf8ea3fc4..b0a768f12c016 100644
--- a/examples/graphql-file-upload-example/frontend/src/index.tsx
+++ b/examples/graphql-file-upload-example/frontend/src/index.tsx
@@ -8,7 +8,7 @@ ReactDOM.render(