Skip to content

Instantly share code, notes, and snippets.

@iparrabb

iparrabb/query.js Secret

Last active Aug 27, 2019
Embed
What would you like to do?
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
You can’t perform that action at this time.