Skip to content

Commit

Permalink
feat: Add SEEK graphql types (#36)
Browse files Browse the repository at this point in the history
* feat: add codegen to pull in seek graph schema

* feat: add exports to seek types within fe/lib

* chore: add changeset
  • Loading branch information
aaronvanston authored Jun 5, 2020
1 parent ce45f0b commit b307e2f
Show file tree
Hide file tree
Showing 8 changed files with 4,306 additions and 196 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-phones-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'wingman-fe': minor
---

Exports SEEK graphql types for consumer use
20 changes: 20 additions & 0 deletions codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
generates:
./types/seek.graphql.ts:
schema: ${SEEK_SCHEMA_PATH:https://graphql.seek.com/graphql}
plugins:
- typescript
./types/seekFragmentTypes.ts:
schema: ${SEEK_SCHEMA_PATH:https://graphql.seek.com/graphql}
plugins:
- fragment-matcher
config:
module: es2015

config:
scalars:
DateTime: string
Date: string
HistoryDate: string
declarationKind: 'interface'
namingConvention:
transformUnderscore: true
1 change: 1 addition & 0 deletions fe/lib/types/seekFragmentTypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../../../types/seekFragmentTypes';
1 change: 1 addition & 0 deletions fe/lib/types/seekTypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../../../types/seek.graphql';
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@
"lint": "yarn workspaces run lint",
"stage": "changeset version && yarn format",
"release": "yarn be build && changeset publish",
"test": "yarn workspaces run test"
"test": "yarn workspaces run test",
"codegen": "graphql-codegen --config codegen.yml"
},
"workspaces": [
"be",
"fe"
],
"version": "0.0.0"
"version": "0.0.0",
"devDependencies": {
"@graphql-codegen/cli": "^1.15.1",
"@graphql-codegen/fragment-matcher": "^1.15.1",
"@graphql-codegen/typescript": "^1.15.1"
}
}
Loading

0 comments on commit b307e2f

Please sign in to comment.