Create subscription type instead of importing from GraphQL

This commit is contained in:
Jackson Harper 2022-04-21 12:03:52 -07:00
parent c3c65479bb
commit e6ca3c8eb4
2 changed files with 16 additions and 2 deletions

View file

@ -1,6 +1,6 @@
import { gql } from 'graphql-request'
import { gqlFetcher } from '../networkHelpers'
import { Subscription } from '@omnivore/api/src/generated/graphql'
import { Subscription } from '../queries/useGetSubscriptionsQuery'
type UnsubscribeResult = {
unsubscribe: Unsubscribe

View file

@ -1,7 +1,21 @@
import { gql } from 'graphql-request'
import useSWR from 'swr'
import { publicGqlFetcher } from '../networkHelpers'
import { Subscription } from '@omnivore/api/src/generated/graphql'
export type SubscriptionStatus = 'ACTIVE' | 'DELETED' | 'UNSUBSCRIBED'
export type Subscription = {
id: string
name: string
newsletterEmail: string
url?: string
description?: string
status: SubscriptionStatus
createdAt: Date
updatedAt: Date
};
type SubscriptionsQueryResponse = {
isValidating: boolean