Created
October 8, 2021 12:10
-
-
Save fnnzzz/2ebffcc7eaa6e80fb4b87847d5e538da to your computer and use it in GitHub Desktop.
gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as Types from '../../types-generated'; | |
import { gql } from 'apollo-angular'; | |
import { Injectable } from '@angular/core'; | |
import * as Apollo from 'apollo-angular'; | |
export type BranchDictionaryItemFragment = ( | |
{ readonly __typename?: 'Branch' } | |
& Pick<Types.Branch, 'id' | 'name'> | |
); | |
export type GetBranchesDictionaryQueryVariables = Types.Exact<{ [key: string]: never; }>; | |
export type GetBranchesDictionaryQuery = ( | |
{ readonly __typename?: 'Query' } | |
& { readonly branches: ReadonlyArray<Types.Maybe<( | |
{ readonly __typename?: 'Branch' } | |
& BranchDictionaryItemFragment | |
)>> } | |
); | |
export type GetBranchByIdQueryVariables = Types.Exact<{ | |
id: Types.Scalars['ID']; | |
}>; | |
export type GetBranchByIdQuery = ( | |
{ readonly __typename?: 'Query' } | |
& { readonly branch: Types.Maybe<( | |
{ readonly __typename?: 'Branch' } | |
& BranchDictionaryItemFragment | |
)> } | |
); | |
export const BranchDictionaryItemFragmentDoc = /*#__PURE__*/ gql` | |
fragment BranchDictionaryItem on Branch { | |
id | |
name | |
} | |
`; | |
export const GetBranchesDictionaryDocument = /*#__PURE__*/ gql` | |
query getBranchesDictionary { | |
branches { | |
...BranchDictionaryItem | |
} | |
} | |
${BranchDictionaryItemFragmentDoc}`; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class GetBranchesDictionaryGQL extends Apollo.Query<GetBranchesDictionaryQuery, GetBranchesDictionaryQueryVariables> { | |
document = GetBranchesDictionaryDocument; | |
client = 'gql-vacancies'; | |
constructor(apollo: Apollo.Apollo) { | |
super(apollo); | |
} | |
} | |
export const GetBranchByIdDocument = /*#__PURE__*/ gql` | |
query getBranchById($id: ID!) { | |
branch(id: $id) { | |
...BranchDictionaryItem | |
} | |
} | |
${BranchDictionaryItemFragmentDoc}`; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class GetBranchByIdGQL extends Apollo.Query<GetBranchByIdQuery, GetBranchByIdQueryVariables> { | |
document = GetBranchByIdDocument; | |
client = 'gql-vacancies'; | |
constructor(apollo: Apollo.Apollo) { | |
super(apollo); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment