Fetch teekyuu with graphql request

This commit is contained in:
Hydroxycarbamide 2022-05-15 15:35:02 +02:00
parent b4edb9d8f8
commit 03e63ff580
7 changed files with 1238 additions and 8 deletions

18
src/gql/anime.js Normal file
View file

@ -0,0 +1,18 @@
import { gql } from "apollo-boost";
export default gql`
query ($id: Int) { # Define which variables will be used in the query (id)
Media (id: $id, type: ANIME) { # Insert our variables into the query arguments (id) (type: ANIME is hard-coded in the query)
id
title {
romaji
english
native
}
description (asHtml: false)
coverImage {
large
}
}
}
`;