import { graphql } from "gql.tada"; import { GraphQLClient } from "graphql-request"; import type { Title } from "~/types/title"; import { MediaFragment } from "~/types/title/mediaFragment"; const GetTitleQuery = graphql( ` query GetTitle($id: Int!) { Media(id: $id) { ...Media } } `, [MediaFragment], ); export async function fetchTitleFromAnilist( id: number, token: string | undefined, ): Promise