diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..79dcfc465
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,4 @@
+cypress
+node_modules
+.github
+.next
\ No newline at end of file
diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml
new file mode 100644
index 000000000..a41c10cf3
--- /dev/null
+++ b/.github/workflows/database.yml
@@ -0,0 +1,113 @@
+name: Database
+on: [pull_request]
+jobs:
+ pscale:
+ runs-on: ubuntu-latest
+ env:
+ PLANETSCALE_SERVICE_TOKEN_NAME: ''
+ PLANETSCALE_SERVICE_TOKEN: ''
+ PLANETSCALE_ORG: ''
+ DATABASE_URL: ''
+ POSTMARK_CLIENT_ID: ''
+ JWT_SIGNING_KEY: ''
+ AUTH0_SECRET: ''
+ AUTH0_BASE_URL: ''
+ AUTH0_CLIENT_ID: ''
+ AUTH0_CLIENT_SECRET: ''
+ AUTH0_MANAGEMENT_CLIENT_ID: ''
+ AUTH0_MANAGEMENT_CLIENT_SECRET: ''
+ AUTH0_ISSUER_BASE_URL: ''
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Setup Node
+ uses: actions/setup-node@v2
+ with:
+ node-version: '16.11'
+
+ - name: Install tooling
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y jq
+ docker pull planetscale/pscale:latest
+ npm install -g yarn
+
+ - name: Configure yarn cache
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+
+ - name: Point to yarn cache
+ uses: actions/cache@v2
+ id: yarn-cache
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
+ - name: Install modules
+ run: yarn --frozen-lockfile
+
+ - name: Get branch and short sha
+ id: variables
+ shell: bash
+ run: |
+ echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})"
+ echo "::set-output name=sha_short::$(echo $(git rev-parse --short HEAD))"
+
+ - name: Create planetscale development branch
+ container: planetscale/pscale:latest
+ run: >
+ docker run \
+ -e PLANETSCALE_SERVICE_TOKEN_NAME=${{ env.PLANETSCALE_SERVICE_TOKEN_NAME }} \
+ -e PLANETSCALE_SERVICE_TOKEN=${{ env.PLANETSCALE_SERVICE_TOKEN }} \
+ -e PLANETSCALE_ORG=${{ env.PLANETSCALE_ORG }} \
+ planetscale/pscale:latest branch create \
+ brios-test-env-database \
+ ${{ steps.variables.outputs.branch }}-${{ steps.variables.outputs.sha_short }}-${{ github.run_id }}
+
+ - name: Wait for planetscale db branch readiness
+ container: planetscale/pscale:latest
+ run: |
+ echo "Checking if the planetscale db branch is ready to accept connections...👀";
+ while true; do
+ echo $(docker run -e PLANETSCALE_SERVICE_TOKEN_NAME=${{ env.PLANETSCALE_SERVICE_TOKEN_NAME }} -e PLANETSCALE_SERVICE_TOKEN=${{ env.PLANETSCALE_SERVICE_TOKEN }} -e PLANETSCALE_ORG=${{ env.PLANETSCALE_ORG }} planetscale/pscale:latest branch list brios-test-env-database --format json | jq -c ".[] | select(.name == \"${{ steps.variables.outputs.branch }}-${{ steps.variables.outputs.sha_short }}-${{ github.run_id }}\") | .ready") > BRANCH_READINESS;
+ if [[ "$(cat BRANCH_READINESS)" == "false" ]]
+ then
+ echo "Branch not ready yet -- checking again in 5 seconds 🐝";
+ sleep 5;
+ else
+ echo "Branch is ready to accept connections! 🚀";
+ exit 0;
+ fi
+ done
+
+ - name: Connect to planetscale db branch
+ container: planetscale/pscale:latest
+ run: |
+ docker run \
+ -e PLANETSCALE_SERVICE_TOKEN_NAME=${{ env.PLANETSCALE_SERVICE_TOKEN_NAME }} \
+ -e PLANETSCALE_SERVICE_TOKEN=${{ env.PLANETSCALE_SERVICE_TOKEN }} \
+ -e PLANETSCALE_ORG=${{ env.PLANETSCALE_ORG }} \
+ -e PSCALE_ALLOW_NONINTERACTIVE_SHELL=true \
+ -p 3309:3309 \
+ -d \
+ planetscale/pscale:latest connect \
+ brios-test-env-database \
+ ${{ steps.variables.outputs.branch }}-${{ steps.variables.outputs.sha_short }}-${{ github.run_id }} \
+ --port 3309
+
+ - name: Run integration tests
+ run: |
+ yarn dev &
+ sleep 5
+ yarn test
+ env:
+ - name: Delete planetscale db branch
+ uses: docker://planetscale/pscale:latest
+ with:
+ entrypoint: /usr/bin/pscale
+ args: |
+ branch delete brios-test-env-database ${{ steps.variables.outputs.branch }}-${{ steps.variables.outputs.sha_short }}-${{ github.run_id }} --force
diff --git a/.gitignore b/.gitignore
index 68b068864..68312de10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,5 @@ node_modules
yarn-error.log
.vercel
cors.json
-src/data/local/*
\ No newline at end of file
+src/data/local/*
+tsconfig.tsbuildinfo
\ No newline at end of file
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 000000000..9a5911ec0
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+16.11
\ No newline at end of file
diff --git a/codegen.yml b/codegen.yml
index f70447b6f..95cf94959 100644
--- a/codegen.yml
+++ b/codegen.yml
@@ -22,3 +22,13 @@ generates:
withComponent: false
reactApolloVersion: 3
preResolveTypes: true
+ ./tests/generated/types.ts:
+ documents:
+ test/documents/**/*.graphql:
+ skipGraphQLImport: false
+ plugins:
+ - typescript
+ - typescript-operations
+ - typed-document-node
+ config:
+ enumsAsTypes: true
diff --git a/jest.config.js b/jest.config.js
new file mode 100644
index 000000000..f5fba0554
--- /dev/null
+++ b/jest.config.js
@@ -0,0 +1,10 @@
+module.exports = {
+ preset: 'ts-jest/presets/js-with-ts-esm',
+ testEnvironment: 'node',
+ globals: {
+ 'ts-jest': {
+ useESM: true,
+ },
+ },
+ testTimeout: 10000,
+}
diff --git a/next-env.d.ts b/next-env.d.ts
index 9bc3dd46b..4f11a03dc 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,5 +1,4 @@
///
-///
///
// NOTE: This file should not be edited
diff --git a/package.json b/package.json
index ec4e1027f..cacd9324e 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,8 @@
"generate:watch": "graphql-codegen --watch 'src/graphql/**/*.ts'",
"postinstall": "yarn generate && prisma generate",
"db:dev": "pscale connect brianlovin dev --port 3309",
- "db:prod": "pscale connect brianlovin main --port 3309"
+ "db:prod": "pscale connect brianlovin main --port 3309",
+ "test": "yarn node --experimental-vm-modules --experimental-modules $(yarn bin jest)"
},
"husky": {
"hooks": {
@@ -45,7 +46,7 @@
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",
"lru-cache": "^6.0.0",
- "next": "12.0.0",
+ "next": "12.0.7",
"next-seo": "^4.28.1",
"postmark": "^2.7.8",
"react": "^17.0.2",
@@ -71,6 +72,7 @@
"remove-markdown": "^0.3.0",
"slugify": "^1.6.2",
"string-replace-to-array": "^2.1.0",
+ "ts-node": "^10.8.0",
"turndown": "^7.1.1",
"turndown-plugin-gfm": "^1.0.2",
"unified": "^10.1.0",
@@ -79,11 +81,14 @@
},
"devDependencies": {
"@ardatan/graphql-tools": "^4.1.0",
+ "@babel/preset-env": "^7.16.7",
+ "@babel/preset-typescript": "^7.16.7",
"@bahmutov/add-typescript-to-cypress": "^2.1.2",
"@cypress/webpack-preprocessor": "^4.1.5",
"@fullhuman/postcss-purgecss": "^4.0.3",
"@graphql-codegen/add": "^3.1.0",
"@graphql-codegen/cli": "^2.2.2",
+ "@graphql-codegen/typed-document-node": "^2.2.2",
"@graphql-codegen/typescript": "^2.3.1",
"@graphql-codegen/typescript-operations": "^2.1.8",
"@graphql-codegen/typescript-react-apollo": "^3.2.1",
@@ -94,11 +99,13 @@
"@types/jest": "^27.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^16.11.4",
+ "@types/node-fetch": "^3.0.3",
"@types/react": "^17.0.34",
"@types/webrtc": "^0.0.31",
"@typescript-eslint/parser": "^4.33.0",
"autoprefixer": "^10.3.7",
"babel-eslint": "^10.1.0",
+ "babel-jest": "^27.4.5",
"cypress": "^8.6.0",
"eslint": "^7.32.0",
"eslint-config-next": "^12.0.3",
@@ -108,7 +115,9 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-simple-import-sort": "^7.0.0",
+ "got": "^12.0.0",
"husky": "^7.0.4",
+ "jest": "^27.4.5",
"lint-staged": "^11.2.4",
"now-env": "^3.2.0",
"postcss": "^8.3.11",
@@ -120,6 +129,7 @@
"prisma": "^3.4.1",
"stylelint-config-recommended": "^6.0.0",
"tailwindcss": "^2.2.19",
+ "ts-jest": "^27.1.2",
"typescript": "^4.4.4",
"typescript-eslint-parser": "^22.0.0",
"webpack": "^4.46.0"
diff --git a/src/graphql/types.generated.ts b/src/graphql/types.generated.ts
index 093ffc2ef..13af8b0b3 100644
--- a/src/graphql/types.generated.ts
+++ b/src/graphql/types.generated.ts
@@ -2,2163 +2,1046 @@
// ⚠️ DO NOT EDIT ⚠️
// This file is automatically generated, run yarn run generate to update
-import { gql } from '@apollo/client'
-import * as Apollo from '@apollo/client'
-export type Maybe = T | null
-export type Exact = {
- [K in keyof T]: T[K]
-}
-export type MakeOptional = Omit & {
- [SubKey in K]?: Maybe
-}
-export type MakeMaybe = Omit & {
- [SubKey in K]: Maybe
-}
-const defaultOptions = {}
+import { gql } from '@apollo/client';
+import * as Apollo from '@apollo/client';
+export type Maybe = T | null;
+export type Exact = { [K in keyof T]: T[K] };
+export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
+export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
+const defaultOptions = {}
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
- ID: string
- String: string
- Boolean: boolean
- Int: number
- Float: number
- Date: any
-}
+ ID: string;
+ String: string;
+ Boolean: boolean;
+ Int: number;
+ Float: number;
+ Date: any;
+};
export type AddBookmarkInput = {
- tag: Scalars['String']
- url: Scalars['String']
-}
+ tag: Scalars['String'];
+ url: Scalars['String'];
+};
export type AddPostInput = {
- excerpt?: Maybe
- slug: Scalars['String']
- text: Scalars['String']
- title: Scalars['String']
-}
+ excerpt?: Maybe;
+ slug: Scalars['String'];
+ text: Scalars['String'];
+ title: Scalars['String'];
+};
export type AddQuestionInput = {
- description?: Maybe
- title: Scalars['String']
-}
+ description?: Maybe;
+ title: Scalars['String'];
+};
export type AddStackInput = {
- description: Scalars['String']
- image: Scalars['String']
- name: Scalars['String']
- tag?: Maybe
- url: Scalars['String']
-}
+ description: Scalars['String'];
+ image: Scalars['String'];
+ name: Scalars['String'];
+ tag?: Maybe;
+ url: Scalars['String'];
+};
export type Bookmark = {
- __typename?: 'Bookmark'
- createdAt: Scalars['Date']
- description?: Maybe
- faviconUrl?: Maybe
- host: Scalars['String']
- id: Scalars['ID']
- image?: Maybe
- reactionCount?: Maybe
- tags: Array>
- title?: Maybe
- updatedAt: Scalars['Date']
- url: Scalars['String']
- viewerHasReacted?: Maybe
-}
+ __typename?: 'Bookmark';
+ createdAt: Scalars['Date'];
+ description?: Maybe;
+ faviconUrl?: Maybe;
+ host: Scalars['String'];
+ id: Scalars['ID'];
+ image?: Maybe;
+ reactionCount?: Maybe;
+ tags: Array>;
+ title?: Maybe;
+ updatedAt: Scalars['Date'];
+ url: Scalars['String'];
+ viewerHasReacted?: Maybe;
+};
export type BookmarkEdge = {
- __typename?: 'BookmarkEdge'
- cursor?: Maybe
- node?: Maybe
-}
+ __typename?: 'BookmarkEdge';
+ cursor?: Maybe;
+ node?: Maybe;
+};
export type BookmarkFilter = {
- host?: Maybe
- tag?: Maybe
-}
+ host?: Maybe;
+ tag?: Maybe;
+};
export type BookmarksConnection = {
- __typename?: 'BookmarksConnection'
- edges: Array>
- pageInfo?: Maybe
-}
+ __typename?: 'BookmarksConnection';
+ edges: Array>;
+ pageInfo?: Maybe;
+};
export type Comment = {
- __typename?: 'Comment'
- author: User
- createdAt: Scalars['Date']
- id: Scalars['ID']
- text?: Maybe
- updatedAt?: Maybe
- viewerCanDelete?: Maybe
- viewerCanEdit?: Maybe
-}
+ __typename?: 'Comment';
+ author: User;
+ createdAt: Scalars['Date'];
+ id: Scalars['ID'];
+ text?: Maybe;
+ updatedAt?: Maybe;
+ viewerCanDelete?: Maybe;
+ viewerCanEdit?: Maybe;
+};
export enum CommentType {
Bookmark = 'BOOKMARK',
Post = 'POST',
Question = 'QUESTION',
- Stack = 'STACK',
+ Stack = 'STACK'
}
export type EditBookmarkInput = {
- description?: Maybe
- faviconUrl?: Maybe
- tag?: Maybe
- title: Scalars['String']
-}
+ description?: Maybe;
+ faviconUrl?: Maybe;
+ tag?: Maybe;
+ title: Scalars['String'];
+};
export type EditPostInput = {
- excerpt?: Maybe
- published?: Maybe
- slug: Scalars['String']
- text: Scalars['String']
- title: Scalars['String']
-}
+ excerpt?: Maybe;
+ published?: Maybe;
+ slug: Scalars['String'];
+ text: Scalars['String'];
+ title: Scalars['String'];
+};
export type EditQuestionInput = {
- description?: Maybe
- title: Scalars['String']
-}
+ description?: Maybe;
+ title: Scalars['String'];
+};
export type EditStackInput = {
- description: Scalars['String']
- image: Scalars['String']
- name: Scalars['String']
- tag?: Maybe
- url: Scalars['String']
-}
+ description: Scalars['String'];
+ image: Scalars['String'];
+ name: Scalars['String'];
+ tag?: Maybe;
+ url: Scalars['String'];
+};
export type EditUserInput = {
- email?: Maybe
- username?: Maybe
-}
+ email?: Maybe;
+ username?: Maybe;
+};
export type EmailSubscription = {
- __typename?: 'EmailSubscription'
- subscribed?: Maybe
- type?: Maybe
-}
+ __typename?: 'EmailSubscription';
+ subscribed?: Maybe;
+ type?: Maybe;
+};
export type EmailSubscriptionInput = {
- email?: Maybe
- subscribed: Scalars['Boolean']
- type: EmailSubscriptionType
-}
+ email?: Maybe;
+ subscribed: Scalars['Boolean'];
+ type: EmailSubscriptionType;
+};
export enum EmailSubscriptionType {
HackerNews = 'HACKER_NEWS',
- Newsletter = 'NEWSLETTER',
+ Newsletter = 'NEWSLETTER'
}
export type HackerNewsComment = {
- __typename?: 'HackerNewsComment'
- comments?: Maybe>>
- comments_count?: Maybe
- content?: Maybe
- id?: Maybe
- level?: Maybe
- time?: Maybe
- time_ago?: Maybe
- user?: Maybe
-}
+ __typename?: 'HackerNewsComment';
+ comments?: Maybe>>;
+ comments_count?: Maybe;
+ content?: Maybe;
+ id?: Maybe;
+ level?: Maybe;
+ time?: Maybe;
+ time_ago?: Maybe;
+ user?: Maybe;
+};
export type HackerNewsPost = {
- __typename?: 'HackerNewsPost'
- comments?: Maybe>>
- comments_count?: Maybe
- content?: Maybe
- domain?: Maybe
- id?: Maybe
- time?: Maybe
- time_ago?: Maybe
- title?: Maybe
- url?: Maybe
- user?: Maybe
-}
+ __typename?: 'HackerNewsPost';
+ comments?: Maybe>>;
+ comments_count?: Maybe;
+ content?: Maybe;
+ domain?: Maybe;
+ id?: Maybe;
+ time?: Maybe;
+ time_ago?: Maybe;
+ title?: Maybe;
+ url?: Maybe;
+ user?: Maybe;
+};
export type Mutation = {
- __typename?: 'Mutation'
- addBookmark?: Maybe
- addComment?: Maybe
- addPost?: Maybe
- addQuestion?: Maybe
- addStack?: Maybe
- deleteBookmark?: Maybe
- deleteComment?: Maybe
- deletePost?: Maybe
- deleteQuestion?: Maybe
- deleteStack?: Maybe
- deleteUser?: Maybe
- editBookmark?: Maybe
- editComment?: Maybe
- editEmailSubscription?: Maybe
- editPost?: Maybe
- editQuestion?: Maybe
- editStack?: Maybe
- editUser?: Maybe
- toggleReaction?: Maybe
- toggleStackUser?: Maybe
-}
+ __typename?: 'Mutation';
+ addBookmark?: Maybe;
+ addComment?: Maybe;
+ addPost?: Maybe;
+ addQuestion?: Maybe;
+ addStack?: Maybe;
+ deleteBookmark?: Maybe;
+ deleteComment?: Maybe;
+ deletePost?: Maybe;
+ deleteQuestion?: Maybe;
+ deleteStack?: Maybe;
+ deleteUser?: Maybe;
+ editBookmark?: Maybe;
+ editComment?: Maybe;
+ editEmailSubscription?: Maybe;
+ editPost?: Maybe;
+ editQuestion?: Maybe;
+ editStack?: Maybe;
+ editUser?: Maybe;
+ toggleReaction?: Maybe;
+ toggleStackUser?: Maybe;
+};
+
export type MutationAddBookmarkArgs = {
- data: AddBookmarkInput
-}
+ data: AddBookmarkInput;
+};
+
export type MutationAddCommentArgs = {
- refId: Scalars['ID']
- text: Scalars['String']
- type: CommentType
-}
+ refId: Scalars['ID'];
+ text: Scalars['String'];
+ type: CommentType;
+};
+
export type MutationAddPostArgs = {
- data: AddPostInput
-}
+ data: AddPostInput;
+};
+
export type MutationAddQuestionArgs = {
- data: AddQuestionInput
-}
+ data: AddQuestionInput;
+};
+
export type MutationAddStackArgs = {
- data: AddStackInput
-}
+ data: AddStackInput;
+};
+
export type MutationDeleteBookmarkArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type MutationDeleteCommentArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type MutationDeletePostArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type MutationDeleteQuestionArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type MutationDeleteStackArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type MutationEditBookmarkArgs = {
- data: EditBookmarkInput
- id: Scalars['ID']
-}
+ data: EditBookmarkInput;
+ id: Scalars['ID'];
+};
+
export type MutationEditCommentArgs = {
- id: Scalars['ID']
- text?: Maybe
-}
+ id: Scalars['ID'];
+ text?: Maybe;
+};
+
export type MutationEditEmailSubscriptionArgs = {
- data?: Maybe
-}
+ data?: Maybe;
+};
+
export type MutationEditPostArgs = {
- data: EditPostInput
- id: Scalars['ID']
-}
+ data: EditPostInput;
+ id: Scalars['ID'];
+};
+
export type MutationEditQuestionArgs = {
- data: EditQuestionInput
- id: Scalars['ID']
-}
+ data: EditQuestionInput;
+ id: Scalars['ID'];
+};
+
export type MutationEditStackArgs = {
- data: EditStackInput
- id: Scalars['ID']
-}
+ data: EditStackInput;
+ id: Scalars['ID'];
+};
+
export type MutationEditUserArgs = {
- data?: Maybe
-}
+ data?: Maybe;
+};
+
export type MutationToggleReactionArgs = {
- refId: Scalars['ID']
- type: ReactionType
-}
+ refId: Scalars['ID'];
+ type: ReactionType;
+};
+
export type MutationToggleStackUserArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
export type PageInfo = {
- __typename?: 'PageInfo'
- endCursor?: Maybe
- hasNextPage?: Maybe
- totalCount?: Maybe
-}
+ __typename?: 'PageInfo';
+ endCursor?: Maybe;
+ hasNextPage?: Maybe;
+ totalCount?: Maybe;
+};
export type Post = {
- __typename?: 'Post'
- author?: Maybe
- createdAt?: Maybe
- excerpt?: Maybe
- featureImage?: Maybe
- id: Scalars['ID']
- publishedAt?: Maybe
- reactionCount?: Maybe
- slug?: Maybe
- text?: Maybe
- title?: Maybe
- updatedAt?: Maybe
- viewerHasReacted?: Maybe
-}
+ __typename?: 'Post';
+ author?: Maybe;
+ createdAt?: Maybe;
+ excerpt?: Maybe;
+ featureImage?: Maybe;
+ id: Scalars['ID'];
+ publishedAt?: Maybe;
+ reactionCount?: Maybe;
+ slug?: Maybe;
+ text?: Maybe;
+ title?: Maybe;
+ updatedAt?: Maybe;
+ viewerHasReacted?: Maybe;
+};
export type Query = {
- __typename?: 'Query'
- bookmark?: Maybe
- bookmarks: BookmarksConnection
- comment?: Maybe
- comments: Array>
- hackerNewsPost?: Maybe
- hackerNewsPosts: Array>
- post?: Maybe
- posts: Array>
- question?: Maybe
- questions: QuestionsConnection
- stack?: Maybe
- stacks: StacksConnection
- tags: Array>
- user?: Maybe
- viewer?: Maybe
-}
+ __typename?: 'Query';
+ bookmark?: Maybe;
+ bookmarks: BookmarksConnection;
+ comment?: Maybe;
+ comments: Array>;
+ hackerNewsPost?: Maybe;
+ hackerNewsPosts: Array>;
+ post?: Maybe;
+ posts: Array>;
+ question?: Maybe;
+ questions: QuestionsConnection;
+ stack?: Maybe;
+ stacks: StacksConnection;
+ tags: Array>;
+ user?: Maybe;
+ viewer?: Maybe;
+};
+
export type QueryBookmarkArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type QueryBookmarksArgs = {
- after?: Maybe
- filter?: Maybe
- first?: Maybe
-}
+ after?: Maybe;
+ filter?: Maybe;
+ first?: Maybe;
+};
+
export type QueryCommentArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type QueryCommentsArgs = {
- refId: Scalars['ID']
- type: CommentType
-}
+ refId: Scalars['ID'];
+ type: CommentType;
+};
+
export type QueryHackerNewsPostArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type QueryPostArgs = {
- slug: Scalars['String']
-}
+ slug: Scalars['String'];
+};
+
export type QueryPostsArgs = {
- filter?: Maybe
-}
+ filter?: Maybe;
+};
+
export type QueryQuestionArgs = {
- id: Scalars['ID']
-}
+ id: Scalars['ID'];
+};
+
export type QueryQuestionsArgs = {
- after?: Maybe
- filter?: Maybe
- first?: Maybe
-}
+ after?: Maybe;
+ filter?: Maybe;
+ first?: Maybe;
+};
+
export type QueryStackArgs = {
- slug: Scalars['String']
-}
+ slug: Scalars['String'];
+};
+
export type QueryStacksArgs = {
- after?: Maybe
- first?: Maybe
-}
+ after?: Maybe;
+ first?: Maybe;
+};
+
export type QueryUserArgs = {
- username: Scalars['String']
-}
+ username: Scalars['String'];
+};
export type Question = {
- __typename?: 'Question'
- author?: Maybe
- createdAt: Scalars['Date']
- description?: Maybe
- id: Scalars['ID']
- reactionCount?: Maybe
- status?: Maybe
- title: Scalars['String']
- updatedAt?: Maybe
- viewerCanComment?: Maybe
- viewerCanEdit?: Maybe
- viewerHasReacted?: Maybe
-}
+ __typename?: 'Question';
+ author?: Maybe;
+ createdAt: Scalars['Date'];
+ description?: Maybe;
+ id: Scalars['ID'];
+ reactionCount?: Maybe;
+ status?: Maybe;
+ title: Scalars['String'];
+ updatedAt?: Maybe;
+ viewerCanComment?: Maybe;
+ viewerCanEdit?: Maybe;
+ viewerHasReacted?: Maybe;
+};
export type QuestionEdge = {
- __typename?: 'QuestionEdge'
- cursor?: Maybe
- node?: Maybe
-}
+ __typename?: 'QuestionEdge';
+ cursor?: Maybe;
+ node?: Maybe;
+};
export type QuestionFilter = {
- status?: Maybe
-}
+ status?: Maybe;
+};
export enum QuestionStatus {
Answered = 'ANSWERED',
- Pending = 'PENDING',
+ Pending = 'PENDING'
}
export type QuestionsConnection = {
- __typename?: 'QuestionsConnection'
- edges: Array