Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Aug 19, 2024
1 parent 3f04824 commit f26482a
Show file tree
Hide file tree
Showing 512 changed files with 43,311 additions and 14,734 deletions.
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/dotansimha/graphql-code-generator/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.
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ body:
id: description
attributes:
label: Is your feature request related to a problem? Please describe.
description: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]"
description:
"A clear and concise description of what the problem is. Ex. I'm always frustrated when
[...]"
validations:
required: true
- type: textarea
Expand All @@ -60,7 +62,8 @@ body:
id: alternatives
attributes:
label: Describe alternatives you've considered
description: "A clear and concise description of any alternative solutions or features you've considered."
description:
"A clear and concise description of any alternative solutions or features you've considered."
validations:
required: false
- type: textarea
Expand Down
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.

Related # (issue)

Expand All @@ -18,16 +20,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 @@ -40,7 +45,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 @@ -51,4 +58,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...
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ jobs:
- name: Test ESM & CJS integrity
run: yarn bob check
test:
name: Unit Test on Node ${{matrix.node_version}} (${{matrix.os}}) and GraphQL v${{matrix.graphql_version}}
name:
Unit Test on Node ${{matrix.node_version}} (${{matrix.os}}) and GraphQL
v${{matrix.graphql_version}}
runs-on: ubuntu-latest
needs:
- lint
Expand Down
8 changes: 6 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@v4
Expand All @@ -28,7 +30,9 @@ jobs:
name: build and deploy website
env:
NEXT_BASE_PATH: ${{ github.ref == 'refs/heads/master' && '/graphql/codegen' || '' }}
SITE_URL: ${{ github.ref == 'refs/heads/master' && 'https://the-guild.dev/graphql/codegen' || '' }}
SITE_URL:
${{ github.ref == 'refs/heads/master' && 'https://the-guild.dev/graphql/codegen' || ''
}}
with:
cloudflareApiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflareAccountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ website/src/components/live-demo/LiveDemo.tsx
# This should be added bc our rust test setup for the SWC plugin does a string diff, and it fails
# bc it compares imports with double quotes against the formatted perttier single quotes
packages/presets/swc-plugin/tests/fixtures

*.flow.js
7 changes: 6 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
"name": "Run open test file",
"type": "node",
"request": "launch",
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand", "${relativeFile}"],
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"--runInBand",
"${relativeFile}"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
Expand Down
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,29 @@

[https://the-guild.dev/graphql/codegen](https://the-guild.dev/graphql/codegen)

GraphQL Code Generator is a tool that generates code out of your GraphQL schema. Whether you are developing a frontend or backend, you can utilize GraphQL Code Generator to generate output from your GraphQL Schema and GraphQL Documents (query/mutation/subscription/fragment).
GraphQL Code Generator is a tool that generates code out of your GraphQL schema. Whether you are
developing a frontend or backend, you can utilize GraphQL Code Generator to generate output from
your GraphQL Schema and GraphQL Documents (query/mutation/subscription/fragment).

By analyzing the schema and documents and parsing it, GraphQL Code Generator can output code at a wide variety of formats, based on pre-defined templates or based on custom user-defined ones. Regardless of the language that you're using, GraphQL Code Generator has you covered.
By analyzing the schema and documents and parsing it, GraphQL Code Generator can output code at a
wide variety of formats, based on pre-defined templates or based on custom user-defined ones.
Regardless of the language that you're using, GraphQL Code Generator has you covered.

GraphQL Code Generator lets you choose the output that you need, based on _plugins_, which are very flexible and customizable. You can also write your _plugins_ to generate custom outputs that match your needs.
GraphQL Code Generator lets you choose the output that you need, based on _plugins_, which are very
flexible and customizable. You can also write your _plugins_ to generate custom outputs that match
your needs.

You can try this tool live on your browser and see some useful examples. Check out [GraphQL Code Generator Live Examples](https://the-guild.dev/graphql/codegen/#live-demo).
You can try this tool live on your browser and see some useful examples. Check out
[GraphQL Code Generator Live Examples](https://the-guild.dev/graphql/codegen/#live-demo).

We currently support and maintain [these plugins](https://the-guild.dev/graphql/codegen/plugins) (TypeScript, Flow, React, Angular, MongoDB, Stencil, Reason, and some more), and there is an active community that writes and maintains custom plugins.
We currently support and maintain [these plugins](https://the-guild.dev/graphql/codegen/plugins)
(TypeScript, Flow, React, Angular, MongoDB, Stencil, Reason, and some more), and there is an active
community that writes and maintains custom plugins.

## Quick Start

> You can find the complete instructions in [GraphQL Code Generator website](https://the-guild.dev/graphql/codegen/docs/getting-started/installation).
> You can find the complete instructions in
> [GraphQL Code Generator website](https://the-guild.dev/graphql/codegen/docs/getting-started/installation).
Start by installing the basic deps of GraphQL Codegen:

Expand All @@ -38,27 +48,36 @@ GraphQL Code Generator lets you setup everything by simply running the following
yarn graphql-codegen init
```

Question by question, it will guide you through the whole process of setting up a schema, selecting plugins, picking a destination of a generated file, and a lot more.
Question by question, it will guide you through the whole process of setting up a schema, selecting
plugins, picking a destination of a generated file, and a lot more.

If you wish to [manually setup codegen, follow these instructions](https://the-guild.dev/graphql/codegen/docs/getting-started/installation).
If you wish to
[manually setup codegen, follow these instructions](https://the-guild.dev/graphql/codegen/docs/getting-started/installation).

## Links

Besides our [docs page](https://the-guild.dev/graphql/codegen/docs/getting-started), feel free to go through our published Medium articles to get a better grasp of what GraphQL Code Generator is all about:
Besides our [docs page](https://the-guild.dev/graphql/codegen/docs/getting-started), feel free to go
through our published Medium articles to get a better grasp of what GraphQL Code Generator is all
about:

- [All available plugins & presets](https://the-guild.dev/graphql/codegen/plugins)

## Contributing

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.
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.

Feel free to open issues and pull requests. We're always welcome support from the community.

For a contribution guide specific to this project, please refer to: http://the-guild.dev/graphql/codegen/docs/custom-codegen/contributing.
For a contribution guide specific to this project, please refer to:
http://the-guild.dev/graphql/codegen/docs/custom-codegen/contributing.

## Code of Conduct

Help us keep GraphQL Code Generator 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://contributor-covenant.org)
Help us keep GraphQL Code Generator 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://contributor-covenant.org)

## License

Expand Down
15 changes: 12 additions & 3 deletions dev-test/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ const config: CodegenConfig = {
'typescript-operations',
],
},
'./dev-test/test-schema/env.types.ts': { schema: process.env.SCHEMA_PATH, plugins: ['typescript'] },
'./dev-test/test-schema/env.types.ts': {
schema: process.env.SCHEMA_PATH,
plugins: ['typescript'],
},
'./dev-test/test-schema/typings.immutableTypes.ts': {
schema: './dev-test/test-schema/schema.json',
config: { imutableTypes: true },
Expand Down Expand Up @@ -127,12 +130,18 @@ const config: CodegenConfig = {
},
'./dev-test/star-wars/types.excludeQueryAlpha.ts': {
schema: './dev-test/star-wars/schema.json',
documents: ['./dev-test/star-wars/**/*.graphql', '!./dev-test/star-wars/**/ExcludeQueryAlpha.graphql'],
documents: [
'./dev-test/star-wars/**/*.graphql',
'!./dev-test/star-wars/**/ExcludeQueryAlpha.graphql',
],
plugins: ['typescript', 'typescript-operations'],
},
'./dev-test/star-wars/types.excludeQueryBeta.ts': {
schema: './dev-test/star-wars/schema.json',
documents: ['./dev-test/star-wars/**/*.graphql', '!./dev-test/star-wars/**/ExcludeQueryBeta.graphql'],
documents: [
'./dev-test/star-wars/**/*.graphql',
'!./dev-test/star-wars/**/ExcludeQueryBeta.graphql',
],
plugins: ['typescript', 'typescript-operations'],
},
'./dev-test/star-wars/types.preResolveTypes.ts': {
Expand Down
Loading

0 comments on commit f26482a

Please sign in to comment.