Skip to content

Instantly share code, notes, and snippets.

@Ericnr
Last active October 3, 2020 04:22
Show Gist options
  • Select an option

  • Save Ericnr/1a227b88a338d325bcb7b918b65e6ca4 to your computer and use it in GitHub Desktop.

Select an option

Save Ericnr/1a227b88a338d325bcb7b918b65e6ca4 to your computer and use it in GitHub Desktop.
Todos
import {
Todos_viewer,
Todos_viewer$key,
} from './_generated_/Todos_viewer.graphql';
interface Props {
viewer: Todos_viewer$key;
}
export const Todos = ({ viewer }: Props) => {
const { todos }: Todos_viewer = useFragment(
graphql`
fragment Todos_viewer on User {
todos {
id
description
isCompleted
}
}
`,
viewer
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment