import { gql } from "@apollo/client";

export const GET_PROJECTS_BY_SLUGS = gql`
  query GetProjectsBySlug(
    $locale: I18NLocaleCode!
    $filters: ProjectFiltersInput
  ) {
    projects(locale: $locale, filters: $filters) {
      data {
        attributes {
          title
          subDescriptions
          slugUrl
          tags {
            name
          }
          createdAt
          image {
            data {
              attributes {
                url
              }
            }
          }
        }
      }
    }
  }
`;

export const GET_PROJECT_LIST = gql`
  query GetProjectList($locale: I18NLocaleCode!, $pagination: PaginationArg) {
    projects(locale: $locale, pagination: $pagination) {
      data {
        attributes {
          title
          slugUrl
          createdAt
          subDescriptions
          tags {
            name
          }
          image {
            data {
              attributes {
                url
              }
            }
          }
        }
      }
      meta {
        pagination {
          total
          page
          pageCount
          pageSize
        }
      }
    }
  }
`;
