Skip to content

Instantly share code, notes, and snippets.

Working from home

kuba holak khola

Working from home
View GitHub Profile
View useQuery.js
import { useEffect, useState } from "react";
import { API, graphqlOperation } from "aws-amplify";
import * as queries from "../queries";
export const useQuery = query => {
const [loading, setLoading] = useState(true);
const [data, setData] = useState(null);
const getFromAPI = async () => {
const users = await API.graphql(graphqlOperation(queries[query]));
View responseMapping.vtl
#if($context.result["User"] == $"email"))
import lambdalayer.mymodule
def lambda_handler(event, context)
mymodule.offloadedcode(event, context)
You can’t perform that action at this time.