Skip to content

Commit d1ce764

Browse files
committed
initial commit
1 parent 4efc987 commit d1ce764

File tree

130 files changed

+3668
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+3668
-1
lines changed

.eslintrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"project": "tsconfig.json"
6+
},
7+
"plugins": ["@typescript-eslint"],
8+
"rules": {
9+
"@typescript-eslint/no-non-null-assertion": "error",
10+
"@typescript-eslint/no-unsafe-argument": "error",
11+
"@typescript-eslint/no-unsafe-call": "error"
12+
},
13+
"root": true,
14+
"ignorePatterns": ["dist", "docs"]
15+
}

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
ci:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Bun
16+
uses: oven-sh/setup-bun@v1
17+
18+
- name: Install Dependencies
19+
run: bun install
20+
21+
- name: Run Prettier
22+
run: bun format-check
23+
24+
- name: Lint
25+
run: bun lint
26+
27+
- name: Unit Tests
28+
run: bun test
29+
30+
- uses: actions/setup-java@v4
31+
with:
32+
distribution: adopt
33+
java-version: "17"
34+
35+
- name: Integration Test
36+
run: bun integration

.github/workflows/docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy Docs Site
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- ".github/workflows/docs.yml"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
20+
21+
defaults:
22+
run:
23+
working-directory: docs
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Bun
33+
uses: oven-sh/setup-bun@v1
34+
35+
- name: Install Dependencies
36+
run: bun install
37+
38+
- name: Build Docs
39+
run: bun docs:build
40+
41+
- name: Setup Pages
42+
uses: actions/configure-pages@v4
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: ./docs/build
48+
49+
deploy:
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
runs-on: ubuntu-latest
54+
needs: build
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
uses: actions/deploy-pages@v4

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
ci:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Bun
16+
uses: oven-sh/setup-bun@v1
17+
18+
- name: Install Dependencies
19+
run: bun install
20+
21+
- name: Setup Authentication
22+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
23+
24+
- name: Create Release
25+
run: bunx semantic-release
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.gradle
2+
.idea
3+
build
4+
dist
5+
node_modules
6+
test/integration/Types.kt
7+
test/**/actual.kt

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun lint && bun format && git add .

.releaserc.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
plugins:
2+
- - "@semantic-release/commit-analyzer"
3+
- preset: angular
4+
releaseRules:
5+
- breaking: true
6+
release: major
7+
- type: breaking
8+
release: major
9+
- type: docs
10+
release: patch
11+
- type: refactor
12+
release: patch
13+
- type: chore
14+
release: patch
15+
- scope: no-release
16+
release: false
17+
- "@semantic-release/github"
18+
- "@semantic-release/npm"
19+
- "@semantic-release/release-notes-generator"
20+
branches:
21+
- main

CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributing
2+
3+
We'd love to accept your patches and contributions to this project. There are just a few guidelines you need to follow which are described in detail below.
4+
5+
## How To Contribute
6+
7+
### 1. Fork this repo
8+
9+
You should create a fork of this project in your account and work from there. You can create a fork by clicking the fork button in GitHub.
10+
11+
### 2. One feature, one branch
12+
13+
Work for each new feature/issue should occur in its own branch. To create a new branch from the command line:
14+
15+
```shell
16+
git checkout -b my-new-feature
17+
```
18+
19+
where "my-new-feature" describes what you're working on.
20+
21+
### 3. Add tests for any bug fixes or new functionality
22+
23+
All functions must be tested with a unit test. Please follow the existing convention of one exported function per file with a corresponding file to test it. Run tests using `bun test`.
24+
25+
### 4. Check code style
26+
27+
Before opening a pull request, ensure that you have installed all dependencies so the pre-commit hooks will run.
28+
These hooks will run ESLint according to the [.eslintrc.json](./.eslintrc.json) and style the code according to the prettier defaults.
29+
30+
### 5. Add documentation for new or updated functionality
31+
32+
Please review all the .md files in this project to see if they are impacted by your change and update them accordingly.
33+
34+
### 6. Format Commits
35+
36+
This project uses [Semantic Release](https://github.com/semantic-release/semantic-release) for versioning. As such, commits need to follow the format: `<type>(<scope>): <short summary>`. All fields are required.
37+
38+
### 7. Submit Pull Request and describe the change
39+
40+
Push your changes to your branch and open a pull request against the parent repo on GitHub. The project administrators will review your pull request and respond with feedback.
41+
42+
## How Your Contribution Gets Merged
43+
44+
Upon Pull Request submission, your code will be reviewed by the maintainers. They will confirm at least the following:
45+
46+
- Tests run successfully (unit, coverage, integration, style).
47+
- Contribution policy has been followed.
48+
49+
One (human) reviewer will need to sign off on your Pull Request before it can be merged.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,4 @@
198198
distributed under the License is distributed on an "AS IS" BASIS,
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201-
limitations under the License.
201+
limitations under the License.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# GraphQL Kotlin Codegen
2+
3+
GraphQL Kotlin Codegen is a plugin for [graphql-codegen](https://the-guild.dev/graphql/codegen) that generates Kotlin code from
4+
[Schema Definition Language (SDL)](https://www.apollographql.com/tutorials/lift-off-part1/03-schema-definition-language-sdl).
5+
This Kotlin code is meant to be consumed by services using [GraphQL Kotlin](https://opensource.expediagroup.com/graphql-kotlin/docs/) and allows SDL to drive the implementation of your schema.
6+
In essence, it unlocks a schema-first approach to [code-first GraphQL](https://www.apollographql.com/blog/schema-first-vs-code-only-graphql).
7+
8+
Visit our [documentation site](https://opensource.expediagroup.com/graphql-kotlin-codegen/) for more details.
9+
10+
## Contributions
11+
12+
- To get started, please fork the repo and checkout a new branch. See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
13+
14+
## Contact
15+
16+
This project is part of [Expedia Group Open Source](https://expediagroup.github.io) but also maintained by a dedicated team.
17+
18+
## License
19+
20+
This project is available under the [Apache 2.0 License](./LICENSE).

0 commit comments

Comments
 (0)