File schema.ts
has 953 lines of code (exceeds 250 allowed). Consider refactoring.
import { Observable } from 'graphql-typed-client'
export interface Query {
posts: (Post | null)[]
post: Post | null
Similar blocks of code found in 2 locations. Consider refactoring.
export interface PostObservableChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
title: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
featuredImage: MediaObservableChain & {
execute: (request: MediaRequest, defaultValue?: Media | null) => Observable<Media | null>
Similar blocks of code found in 2 locations. Consider refactoring.
export interface PostPromiseChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
title: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
featuredImage: MediaPromiseChain & {
execute: (request: MediaRequest, defaultValue?: Media | null) => Promise<Media | null>
Similar blocks of code found in 2 locations. Consider refactoring.
export interface AccountObservableChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
status: { execute: (request?: boolean | number, defaultValue?: AccountStatus) => Observable<AccountStatus> }
firstName: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
lastName: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
Similar blocks of code found in 2 locations. Consider refactoring.
export interface AccountPromiseChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
status: { execute: (request?: boolean | number, defaultValue?: AccountStatus) => Promise<AccountStatus> }
firstName: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
lastName: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
Similar blocks of code found in 2 locations. Consider refactoring.
export interface QueryObservableChain {
posts: ((args?: {
where?: PostWhereInput | null
orderBy?: PostOrderByInput | null
skip?: Int | null
Similar blocks of code found in 2 locations. Consider refactoring.
export interface QueryPromiseChain {
posts: ((args?: {
where?: PostWhereInput | null
orderBy?: PostOrderByInput | null
skip?: Int | null
Similar blocks of code found in 2 locations. Consider refactoring.
export interface SpherePromiseChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
alias: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
aliasSlug: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
slugPrefix: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
Similar blocks of code found in 2 locations. Consider refactoring.
export interface SphereObservableChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
alias: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
aliasSlug: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
slugPrefix: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
Similar blocks of code found in 2 locations. Consider refactoring.
export interface PostMetadataPromiseChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
fileHash: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
filename: { execute: (request?: boolean | number, defaultValue?: String | null) => Promise<String | null> }
createdAt: { execute: (request?: boolean | number, defaultValue?: DateTime) => Promise<DateTime> }
Similar blocks of code found in 2 locations. Consider refactoring.
export interface PostMetadataObservableChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
fileHash: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
filename: { execute: (request?: boolean | number, defaultValue?: String | null) => Observable<String | null> }
createdAt: { execute: (request?: boolean | number, defaultValue?: DateTime) => Observable<DateTime> }
Similar blocks of code found in 2 locations. Consider refactoring.
export interface MediaPromiseChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
url: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
type: { execute: (request?: boolean | number, defaultValue?: MEDIA_TYPE) => Promise<MEDIA_TYPE> }
}
Similar blocks of code found in 2 locations. Consider refactoring.
export interface MediaObservableChain {
id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
url: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
type: { execute: (request?: boolean | number, defaultValue?: MEDIA_TYPE) => Observable<MEDIA_TYPE> }
}
Similar blocks of code found in 2 locations. Consider refactoring.
export enum PostOrderByInput {
id_ASC = 'id_ASC',
id_DESC = 'id_DESC',
title_ASC = 'title_ASC',
title_DESC = 'title_DESC',
Similar blocks of code found in 6 locations. Consider refactoring.
images?:
| [
{
where?: MediaWhereInput | null
orderBy?: MediaOrderByInput | null
Similar blocks of code found in 6 locations. Consider refactoring.
spheres?:
| [
{
where?: SphereWhereInput | null
orderBy?: SphereOrderByInput | null
Similar blocks of code found in 6 locations. Consider refactoring.
spheres?:
| [
{
where?: SphereWhereInput | null
orderBy?: SphereOrderByInput | null
Similar blocks of code found in 6 locations. Consider refactoring.
posts?:
| [
{
where?: PostWhereInput | null
orderBy?: PostOrderByInput | null
Similar blocks of code found in 6 locations. Consider refactoring.
posts?:
| [
{
where?: PostWhereInput | null
orderBy?: PostOrderByInput | null
Similar blocks of code found in 6 locations. Consider refactoring.
posts?:
| [
{
where?: PostWhereInput | null
orderBy?: PostOrderByInput | null
Similar blocks of code found in 2 locations. Consider refactoring.
export interface MutationPromiseChain {
mediaUpload: (args: {
file: Upload
}) => MediaPromiseChain & { execute: (request: MediaRequest, defaultValue?: Media | null) => Promise<Media | null> }
}
Similar blocks of code found in 2 locations. Consider refactoring.
export interface MutationObservableChain {
mediaUpload: (args: {
file: Upload
}) => MediaObservableChain & { execute: (request: MediaRequest, defaultValue?: Media | null) => Observable<Media | null> }
}
Similar blocks of code found in 7 locations. Consider refactoring.
export const isMutation = (obj: { __typename: String }): obj is Mutation => {
if (!obj.__typename) throw new Error('__typename is missing')
return Mutation_possibleTypes.includes(obj.__typename)
}
Similar blocks of code found in 7 locations. Consider refactoring.
export const isMedia = (obj: { __typename: String }): obj is Media => {
if (!obj.__typename) throw new Error('__typename is missing')
return Media_possibleTypes.includes(obj.__typename)
}
Similar blocks of code found in 7 locations. Consider refactoring.
export const isQuery = (obj: { __typename: String }): obj is Query => {
if (!obj.__typename) throw new Error('__typename is missing')
return Query_possibleTypes.includes(obj.__typename)
}
Similar blocks of code found in 7 locations. Consider refactoring.
export const isPostMetadata = (obj: { __typename: String }): obj is PostMetadata => {
if (!obj.__typename) throw new Error('__typename is missing')
return PostMetadata_possibleTypes.includes(obj.__typename)
}
Similar blocks of code found in 7 locations. Consider refactoring.
export const isAccount = (obj: { __typename: String }): obj is Account => {
if (!obj.__typename) throw new Error('__typename is missing')
return Account_possibleTypes.includes(obj.__typename)
}
Similar blocks of code found in 7 locations. Consider refactoring.
export const isSphere = (obj: { __typename: String }): obj is Sphere => {
if (!obj.__typename) throw new Error('__typename is missing')
return Sphere_possibleTypes.includes(obj.__typename)
}
Similar blocks of code found in 7 locations. Consider refactoring.
export const isPost = (obj: { __typename: String }): obj is Post => {
if (!obj.__typename) throw new Error('__typename is missing')
return Post_possibleTypes.includes(obj.__typename)
}
Similar blocks of code found in 2 locations. Consider refactoring.
export enum SphereOrderByInput {
id_ASC = 'id_ASC',
id_DESC = 'id_DESC',
alias_ASC = 'alias_ASC',
alias_DESC = 'alias_DESC',
There are no issues that match your filters.