mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Create subscription type instead of importing from GraphQL
This commit is contained in:
parent
c3c65479bb
commit
e6ca3c8eb4
2 changed files with 16 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue