This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
myEvents: [Event] @auth(role:"event.owner") | |
searchEvents: [Event] @myElasticCluster(index:"allEvents") | |
upcomingEvents: [Event] @dynamoDB(index:"upcoming") | |
pastEvents: [Event] @cacheControl(maxAge: 60000) @myLongTermStorage(index:"past") | |
# Other fields, etc | |
} | |
input EventInput { | |
name: String! | |
coverImage: Upload @s3(bucketName:"events") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
upcomingEvents: [Event] | |
pastEvents: [Event] | |
# Other fields, etc | |
} | |
input EventInput { | |
name: String! | |
} | |
type Mutation { | |
createEvent(input:EventInput!): Event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { KeyValueCache } from 'apollo-server-caching'; | |
// TODO add option for DAX here | |
// import AmazonDaxClient = require('aws-sdk/clients/dax'); | |
import DynamoDB = require('aws-sdk/clients/dynamodb'); | |
import { ServiceConfigurationOptions } from 'aws-sdk/lib/service'; | |
export class DynamoDBCache implements KeyValueCache { | |
readonly client; | |
readonly tableOptions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'babel-polyfill'; | |
const { ApolloServer, gql } = require('apollo-server-lambda'); | |
const { RedisCache } = require('apollo-server-redis'); | |
const { RESTDataSource } = require('apollo-datasource-rest'); | |
const AWSXRay = require('aws-xray-sdk'); | |
const AWS = AWSXRay.captureAWS(require('aws-sdk')); | |
class NYTIMESAPI extends RESTDataSource { | |
baseURL = ' https://api.nytimes.com/svc/search/v2/articlesearch.json'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: serverless-apollo-datasource-redis | |
frameworkVersion: ">=1.21.0 <2.0.0" | |
provider: | |
profile: ${opt:stage} | |
name: aws | |
runtime: nodejs8.10 | |
stage: ${opt:stage} | |
region: ${opt:region} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python dynamodump.py -m backup -r local -s "staging*" --host localhost --port 8000 --dumpPath tablebackups --schemaOnly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
concurrent = 1 | |
check_interval = 0 | |
[[runners]] | |
name = "Fun with EB CI sample in EC2" | |
url = "https://gitlab.com/ci" | |
token = "XXXXXXXXXXXXXX" | |
executor = "docker" | |
[runners.docker] | |
tls_verify = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files: | |
"/etc/httpd/conf.d/apache_custom_values.conf" : | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
LoadModule rewrite_module modules/mod_rewrite.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
branch-defaults: | |
master: | |
environment: funwitheb-production | |
global: | |
application_name: funwitheb | |
default_ec2_keyname: funwitheb-ci | |
default_platform: 64bit Amazon Linux 2016.03 v2.1.5 running PHP 7.0 | |
default_region: ap-southeast-1 | |
profile: eb-cli | |
sc: git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sSL https://get.docker.com/ | sh | |
sudo usermod -aG docker ec2-user | |
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash | |
sudo yum install gitlab-ci-multi-runner | |
gitlab-ci-multi-runner register |
NewerOlder