Skip to content

Instantly share code, notes, and snippets.

@JulienHe
Created September 5, 2022 03:35
Show Gist options
  • Select an option

  • Save JulienHe/5a43f1deb88b35d98f1d47233483b77c to your computer and use it in GitHub Desktop.

Select an option

Save JulienHe/5a43f1deb88b35d98f1d47233483b77c to your computer and use it in GitHub Desktop.
Get Article Graphql
import { gql } from "@apollo/client";
const GET_ARTICLE = gql`
query getArticles(
$pageSize: Int = 100
$page: Int = 0
$sort: [String] = ["createdAt:desc"]
$filters: ArticleFiltersInput = {}
) {
articles(
pagination: { page: $page, pageSize: $pageSize }
sort: $sort
filters: $filters
) {
data {
id
attributes {
title
subtitle
article_category {
data {
attributes {
Category
}
}
}
}
}
}
}
`;
export default GET_ARTICLE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment