Skip to content

Instantly share code, notes, and snippets.

@iparrabb
Last active December 29, 2021 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iparrabb/6db927029681f7aae20685c36ba9d58d to your computer and use it in GitHub Desktop.
Save iparrabb/6db927029681f7aae20685c36ba9d58d to your computer and use it in GitHub Desktop.
const listPosts = `query listPosts(
$filter: ModelPostFilterInput
$limit: Int
$nextToken: String
) {
listPosts(filter: $filter, limit: $limit, nextToken: $nextToken) {
items {
id
user_id
title
body
createdAt
}
}
}`;
const { data } = await API.graphql(
graphqlOperation(listPosts, {
user_id: {
eq: 10
}
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment