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
module.exports = { | |
presets: [ | |
[ | |
'@babel/preset-env', | |
{ | |
targets: { | |
node: 'current', | |
}, | |
}, | |
], |
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 { ApolloServer } from 'apollo-server-lambda'; | |
import lambdaPlayground from 'graphql-playground-middleware-lambda'; | |
import schema from './schema'; | |
const ENABLE_INTROSPECTION = process.env.STAGE !== 'prod'; | |
const server = new ApolloServer({ | |
schema, | |
playground: ENABLE_INTROSPECTION, |
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 { ApolloServer } from 'apollo-server-lambda'; | |
import schema from './schema'; | |
const ENABLE_INTROSPECTION = process.env.STAGE !== 'prod'; | |
const server = new ApolloServer({ | |
schema, | |
playground: ENABLE_INTROSPECTION, | |
introspection: ENABLE_INTROSPECTION, |
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 { makeExecutableSchema } from 'graphql-tools'; | |
import gql from 'graphql-tag'; | |
const pingSchema = gql` | |
type Query { | |
"Returns 'pong'" | |
ping: String | |
} | |
`; |
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 { useEffect, useCallback, useState, useRef } from 'react'; | |
export default (args) => { | |
const { onDrop } = args; | |
const dragCount = useRef(0); | |
const [isDragging, setDragging] = useState(false); | |
const onDragEnterCallback = useCallback((event) => { | |
event.preventDefault(); |
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 { useEffect, useCallback } from 'react'; | |
export default (args) => { | |
const { onDrop } = args; | |
const onDropCallback = useCallback((event) => { | |
event.preventDefault(); | |
onDrop(event); | |
}, [onDrop]); |
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 { useEffect } from 'react'; | |
export default (args) => { | |
const { | |
onDrop, | |
} = args; | |
useEffect(() => { | |
window.addEventListener('drop', onDrop); | |
return () => { |
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
export default (args) => { | |
}; |
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
resources: | |
tables: | |
Users: | |
name: ${opt:stage}-Users # Table name | |
partitionKey: userId | |
sortKey: state | |
indexes: | |
# Global Secondary Index | |
- name: EmailIndex | |
partitionKey: email |
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
resources: | |
tables: | |
Music: | |
partitionKey: Artist | |
sortKey: SongTitle | |
indexes: | |
- name: GenreByTitleIndex | |
partitionKey: Genre | |
sortKey: AlbumTitle | |
streamType: newItem |
NewerOlder