Skip to content

Commit

Permalink
feat: introduce serverless-apollo-contentful kit 🎉 (#586)
Browse files Browse the repository at this point in the history
* [GraphQL-Serverless-Contentful] Init the starter (#524)

* Init the project

* Added serverless

* Rename the starter

* move to serverless

* remove the hello handler

* static analysis testing

* removing the .build dir

* add .build to .gitignore

* .editorconfig

* added name and description package.json

* added prettier rules

* feat: Add Apollo and tests to the kit (#527)

* feat: Add testing to the kit

* add tsconfig.test

* Fix typescript jest

* fixed codegen

* fix: the test

* feat: adds healthcheck (#543)

* [GraphQL-Serverless-Contentful] Add Contentful to the project (#529)

* feat: Add testing to the kit

* add tsconfig.test

* Fix typescript jest

* fixed codegen

* fix: the test

* Add contentful to the project

* Add the post query mutation

* Add the update mutation

* added graphql.schema to git ignore

* deleted graphql.schema.json

* Add the comment model

* [graphql-pod-kit1] Create README For Graphql-Serverless Kit (#558)

* [GraphQL-Serverless-Contentful] Readme.md

* remove the showcase

* Update starters/graphql-serverless-contentful/README.md

Co-authored-by: Jessica Wilkins  <[email protected]>

Co-authored-by: Jessica Wilkins  <[email protected]>

* chore: adding serverless icons and updating config file

* updating graphql kit name

* locking down dependecies

* adding starter kit card to main site

* adding hasShowcase boolean to package.json

* updating starter kit name in package.json

* updating order for starter kit card

* updating starter kit name in serverless yaml file

* updating starter kits json file

* [GraphQL-Serverless-Contentful] Add seeding script to the starter kit (#585)

* Add seeding script

* fix: replace symbol for comma

Co-authored-by: Maarten Bicknese <[email protected]>

* chore: update all packages

Automatically update all packages to their latest versions by using
npm check updates.

Closes: #791
Relates to: #792

* chore: update to latest schema

* feat: use tabs over spaces

* chore: format all files and fix lint

* chore: convert all files to use tabs

Closes: #794

* fix: restore 2 spaces for yml

* fix: missing@graphql-tools/merge (#825)

* fix: missing@graphql-tools/merge

* chore: pin dep

* chore: verify pnpm (#816)

* [serverless-apollo-contentful] Change jest.config to be typescript#827 (#829)

* [serverless-apollo-contentful] Add missing .env file instructions (#820)

* init

* add screenshots

* docs: update content model docs

Co-authored-by: Maarten Bicknese <[email protected]>

* [serverless-apollo-contentful] Create Technology model (#861)

* feat: jest setup mocks and env

* chore: graphql-tools executor

* add tests

* chore: replicate post tests

* fix: typedefs

* fix: Post -> Comment

* fix: content

* update tests

* fix: tests for comments

* fix: format

* Update starters/graphql-serverless-contentful/src/schema/post/post.resolver.test.ts

Co-authored-by: Maarten Bicknese <[email protected]>

* chore: check if the have been called with

* feat: implement technology model

* chore: clean up old code

* docs: update readme for technology model

Closes: #851

* chore: remove left-over code

* fix: improve small issues

* fix: remove unused line

Co-authored-by: Ian Mungai <[email protected]>
Co-authored-by: kodejuice <[email protected]>

* [serverless-apollo-contentful] Update project structure and technology decisions explanation & Deployment in README  (#874)

* chore: update readme

* fix: remove screenshot

* [serverless-apollo-contentful] Add caching to kit (#897)

* add redis cache

* add redis instructions and docker container

* add docker commands and format

* move redis client

* use official redis image

* cache ttl

* Update starters/graphql-serverless-contentful/README.md

* add redis info to tech section in readme

* fix healthcheck - follow spec

* Update healthcheck.ts

* [serverless-apollo-contentful] Add database migration (#935)

* chore: add database migration  & add to readme

* fix: technology migration

* fix: prettier format

* [serverless-apollo-contentful] Add queueing to kit (#952)

* init

* setup handler and generator

* iamRoleStatements

* complete README

* Update starters/graphql-serverless-contentful/package.json

* typo

* remove params

* remove extra port

* undefined return type

* add env titles

* rename port

* add hint to job message

* remove caret

* [serverless-apollo-contentful] Clean up README.md (#958)

* [graphql-serverless-contentful] Refractor getEnvironment (#939)

* chore: migrations (#964)

* [GraphQL-Serverless-Contentful] Init the starter (#524)

* feat: Add Apollo and tests to the kit (#527)

* feat: adds healthcheck (#543)

* [GraphQL-Serverless-Contentful] Add Contentful to the project (#529)

* [graphql-pod-kit1] Create README For Graphql-Serverless Kit (#558)

* fix: missing@graphql-tools/merge (#825)

* chore: verify pnpm (#816)

* [serverless-apollo-contentful] Change jest.config to be typescript#827 (#829)

* [serverless-apollo-contentful] Add missing .env file instructions (#820)

* [serverless-apollo-contentful] Create Technology model (#861)

* [serverless-apollo-contentful] Update project structure and technology decisions explanation & Deployment in README  (#874)

* [serverless-apollo-contentful] Add caching to kit (#897)

* [serverless-apollo-contentful] Add database migration (#935)

* [serverless-apollo-contentful] Add queueing to kit (#952)

* [serverless-apollo-contentful] Clean up README.md (#958)

* [graphql-serverless-contentful] Refractor getEnvironment (#939)

* [apollo-serverless-contentful] cleanup tasks (#981)

* [serverless-apollo-contentful] Unit test for utils/sqs/is-offline.ts (#985)

* [serverless-apollo-contentful] Unit test for utils/sqs/is-offline.ts (#973)

* [serverless-apollo-contentful] Unit test for utils/redis.ts (#1014)

* [serverless-apollo-contentful] Unit test for utils/redis.ts (#970)

* chore: sendMessage test (#1016)

* [serverless-apollo-contentful] Unit test for utils/sqs/getQueueUrl.ts (#1021)

* [serverless-apollo-contentful] Add contenful status to healthcheck endpoint  (#1033)

* [serverless-apollo-contentful] Unit test for utils/sqs/client.ts (#1025)

* [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-handler.ts (#1034)

* [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-handler.ts#1019

* [serverless-apollo-contentful] Fix: Refactor Unit tests: healthcheck.test.ts (#1035)

* [serverless-apollo-contentful] Queueing feature documentation (#1043)

* [serverless-apollo-contentful] Configure test coverage report to ignore all index.ts files (#1044)

* [serverless-apollo-contentful] Change all test.ts to spec.ts (#1059)

* chore: update deployment section. (#1057)

* [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-generate-job.ts (#1047)

* [serverless-apollo-contentful] Clean up src/schema/technology/technology.resolvers.test.ts (#1063)

* [serverless-apollo-contentful] Clean up src/schema/technology/technology.resolvers.test.ts#1045

* chore: update readme (#1092)

* fix: mock KeyV (#1112)

* fix: readme grammar corrections (#1108)

Co-authored-by: Mark S. Shenouda <[email protected]>
Co-authored-by: William Hutt <[email protected]>
Co-authored-by: Maarten Bicknese <[email protected]>
Co-authored-by: Ian Sam Mungai <[email protected]>
Co-authored-by: Ihar Dziamidau <[email protected]>
Co-authored-by: Sochima Biereagu <[email protected]>
Co-authored-by: Ian Mungai <[email protected]>
  • Loading branch information
7 people authored Feb 23, 2023
1 parent d82707b commit 161857d
Show file tree
Hide file tree
Showing 64 changed files with 2,345 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/website/src/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
PiniaIcon,
QwikIcon,
SolidJsIcon,
ServerlessIcon,
DenoIcon,
ExpressIcon,
PostgresIcon,
Expand Down Expand Up @@ -261,10 +262,22 @@ export const TECHNOLOGIES = [
tags: ['Data Management'],
Icon: (props) => <RxJsIcon {...props} />,
},
{
key: 'serverless',
name: 'Serverless',
tags: ['Infrastructure'],
Icon: (props) => <ServerlessIcon {...props} />,
},
{
key: 'apollo-server',
name: 'Apollo Server',
tags: ['Middleware'],
Icon: (props) => <ApolloIcon {...props} />,
},
{
key: 'graphql',
name: 'GraphQL',
tags: ['Data Management'],
tags: ['API Specification'],
Icon: (props) => <GraphQLIcon {...props} />,
},
{
Expand All @@ -281,7 +294,7 @@ export const TECHNOLOGIES = [
},
{
key: 'apollo',
name: 'Apollo',
name: 'Apollo Client',
tags: ['Data Management'],
Icon: (props) => <ApolloIcon {...props} />,
},
Expand Down
22 changes: 22 additions & 0 deletions packages/website/src/icons/ServerlessIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Props } from './types';

export function ServerlessIcon({ size = 48, className }: Props) {
return (
<svg
width={size}
height={size}
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={className}
viewBox="0 0 256 204"
>
<g>
<path
d="M0,161.20187 L45.311538,161.20187 L31.2732757,203.597885 L0,203.597885 L0,161.20187 Z M0,80.6009425 L72.0009468,80.6009425 L57.9640432,122.996956 L0,122.996956 L0,80.6009425 Z M0,1.47413815e-05 L98.6917145,1.47413815e-05 L84.6520934,42.39467 L0,42.39467 L0,1.47413815e-05 Z M143.348822,1.47413815e-05 L256,1.47413815e-05 L256,42.39467 L129.311918,42.39467 L143.348822,1.47413815e-05 Z M116.660364,80.6009425 L255.999593,80.6009425 L255.999593,122.996956 L102.622101,122.996956 L116.660364,80.6009425 Z M89.9706833,161.20187 L255.999321,161.20187 L255.999321,203.597885 L75.9337796,203.597885 L89.9706833,161.20187 Z"
fill="#F26D61"
fillRule="nonzero"
/>
</g>
</svg>
);
}
1 change: 1 addition & 0 deletions packages/website/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export { ShareIcon } from './ShareIcon';
export { LinkedinIcon } from './LinkedinIcon';
export { QwikIcon } from './QwikIcon';
export { SolidJsIcon } from './SolidJsIcon';
export { ServerlessIcon } from './ServerlessIcon';
export { DenoIcon } from './DenoIcon.tsx';
export { ExpressIcon } from './ExpressIcon';
export { PostgresIcon } from './PostgresIcon';
Expand Down
3 changes: 3 additions & 0 deletions starter-kits.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"svelte-kit-scss": "SvelteKit and SCSS",
"vue3-apollo-quasar": "Vue3, Apollo, and Quasar",
"qwik-graphql-tailwind": "Qwik, GraphQL, and TailwindCSS",
"solidjs-tailwind": "SolidJs and TailwindCSS",
"angular-ngrx-scss": "Angular, NgRx, and SCSS",
"serverless-framework-apollo-contentful": "AWS Serverless, GraphQL Apollo Server, and Contentful CMS",
"solidjs-tailwind": "SolidJS and TailwindCSS",
"angular-ngrx-scss": "Angular, NgRx, and SCSS",
"deno-oak-denodb": "Deno, Oak, and DenoDB",
Expand Down
15 changes: 15 additions & 0 deletions starters/serverless-apollo-contentful/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
14 changes: 14 additions & 0 deletions starters/serverless-apollo-contentful/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#contentful
CONTENTFUL_CONTENT_MANAGEMENT_API_TOKEN=xxx
CONTENTFUL_SPACE_ID=xxx
CONTENTFUL_ENVIRONMENT=master

# redis
REDIS_USER=default
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASS=
REDIS_CACHE_TTL_SECONDS=900

# elasticmq
SQS_PORT=9324
7 changes: 7 additions & 0 deletions starters/serverless-apollo-contentful/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended"],
"ignorePatterns": ["src/generated"]
}
13 changes: 13 additions & 0 deletions starters/serverless-apollo-contentful/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# package directories
node_modules
jspm_packages

.build
coverage
generated

# Serverless directories
.serverless
.env

graphql.schema.json
7 changes: 7 additions & 0 deletions starters/serverless-apollo-contentful/.jest/set-env-vars.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const MOCK_ENV_VARS = {
CONTENTFUL_CONTENT_MANAGEMENT_API_TOKEN:
'MOCK_CONTENTFUL_CONTENT_MANAGEMENT_API_TOKEN',
CONTENTFUL_SPACE_ID: 'MOCK_CONTENTFUL_SPACE_ID',
CONTENTFUL_ENVIRONMENT: 'MOCK_CONTENTFUL_ENVIRONMENT',
};
process.env = { ...process.env, ...MOCK_ENV_VARS };
1 change: 1 addition & 0 deletions starters/serverless-apollo-contentful/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.0
14 changes: 14 additions & 0 deletions starters/serverless-apollo-contentful/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"insertPragma": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
}
Loading

0 comments on commit 161857d

Please sign in to comment.