Skip to content

Commit

Permalink
prettier (#4930)
Browse files Browse the repository at this point in the history
run full prettier
add prettier to pre-commit and CI
  • Loading branch information
gilgardosh authored Jan 10, 2023
1 parent 1a36428 commit c015b02
Show file tree
Hide file tree
Showing 217 changed files with 3,549 additions and 1,382 deletions.
81 changes: 81 additions & 0 deletions .changeset/clever-walls-press.md
Original file line number Diff line number Diff line change
@@ -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
14 changes: 11 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,
Expand All @@ -45,7 +53,7 @@
}
}
],
"ignorePatterns": ["dist", "node_modules", "examples", "website", "scripts"],
"ignorePatterns": ["dist", "node_modules", "examples", "website", "scripts", ".bob"],
"globals": {
"BigInt": true
}
Expand Down
12 changes: 8 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ about: Create a bug report to help us improve

<!-- PLEASE DO NOT REMOVE THIS SECTION -->

_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.
>
Expand All @@ -25,8 +30,7 @@ _Progress of the issue based on the [Contributor Workflow](https://github.com/th

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
Steps to reproduce the behavior:
**To Reproduce** Steps to reproduce the behavior:

<!-- Adding a codesandbox can help us understand the bug better and speed up things -->

Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
22 changes: 15 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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...
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn pretty-quick --staged
yarn lint-staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
dist/
.mesh/
/.husky/_/
.bob/
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand All @@ -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:

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion examples/auth0/privateAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ http
JSON.stringify({
code: 'I am a secret code',
timestamp: Date.now(),
})
}),
);
})
.listen(3001, 'localhost', () => {
Expand Down
Loading

0 comments on commit c015b02

Please sign in to comment.