Fazendaaa/endeavor

View on GitHub
examples/code/title.ts

Summary

Maintainability
A
2 hrs
Test Coverage
import query from '../queries/title.gql';
import { queryAnilist, Media } from 'index';

const animeTitle = async (search: string): Promise<Media> => <Media> await queryAnilist({ query, variables: { search, type: 'ANIME' } });

const mangaTitle = async (search: string): Promise<Media> => <Media> await queryAnilist({ query, variables: { search, type: 'MANGA' } });