/cooperer

Project cooperation app

Primary LanguageCSS

Haskkor Test123456

https://docs.amplify.aws/cli/graphql-transformer/connection#has-one https://formik.org/docs/tutorial https://github.com/jquense/yup https://docs.amplify.aws/lib/auth/manageusers/q/platform/js#account-recovery-verification

Query

import { API, graphqlOperation } from 'aws-amplify' import { useQuery } from "react-query"; // those are generated by Amplify import { GetPostQuery } from "../API"; import { getPost } from "../graphql/queries";

const { data: post, isLoading, refetch } = useQuery( ["post", { id: params.id }], async (_, { id }) => { const result: any = await API.graphql(graphqlOperation(getPost, { id })); return result.data as GetPostQuery; } );

Mutation

import { API, graphqlOperation } from 'aws-amplify' import { useMutation } from "react-query"; // those are generated by Amplify import { DeletePostMutationVariables } from "../API"; import { deletePost } from "../graphql/mutations";

const [deleteGalleryMutation, { isLoading: isDeleting }] = useMutation( async (variables: DeletePostMutationVariables) => await API.graphql(graphqlOperation(deletePost, variables)) );

Address | No dep | OK Category | No dep | OK Comment | Project && User | NOK Location | No dep | OK Project | Category && Location && User | NOK Skill | No dep | OK User | Address | OK