import * as VueApolloComposable from '@vue/apollo-composable' import gql from 'graphql-tag' import type * as VueCompositionApi from 'vue' export type Maybe = T | null export type InputMaybe = Maybe export type Exact = { [K in keyof T]: T[K] } export type MakeOptional = Omit & { [SubKey in K]?: Maybe } export type MakeMaybe = Omit & { [SubKey in K]: Maybe } export type MakeEmpty = { [_ in K]?: never } export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never } export type ReactiveFunction = () => TParam /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: { input: string; output: string } String: { input: string; output: string } Boolean: { input: boolean; output: boolean } Int: { input: number; output: number } Float: { input: number; output: number } Time: { input: any; output: any } } export type ApiKey = { __typename?: 'APIKey' id: Scalars['ID']['output'] key?: Maybe name: Scalars['String']['output'] organization: Organization publish: Scalars['Boolean']['output'] read: Scalars['Boolean']['output'] refs: Array } export type InputApiKey = { name: Scalars['String']['input'] organizationId: Scalars['ID']['input'] publish: Scalars['Boolean']['input'] read: Scalars['Boolean']['input'] refs: Array } export type InputSubGraph = { ref: Scalars['String']['input'] sdl: Scalars['String']['input'] service: Scalars['String']['input'] url?: InputMaybe wsUrl?: InputMaybe } export type Mutation = { __typename?: 'Mutation' addAPIKey: ApiKey addOrganization: Organization addUserToOrganization: Organization removeAPIKey: Organization removeOrganization: Scalars['Boolean']['output'] updateSubGraph: SubGraph } export type MutationAddApiKeyArgs = { input?: InputMaybe } export type MutationAddOrganizationArgs = { name: Scalars['String']['input'] } export type MutationAddUserToOrganizationArgs = { organizationId: Scalars['ID']['input'] userId: Scalars['String']['input'] } export type MutationRemoveApiKeyArgs = { keyName: Scalars['String']['input'] organizationId: Scalars['ID']['input'] } export type MutationRemoveOrganizationArgs = { organizationId: Scalars['ID']['input'] } export type MutationUpdateSubGraphArgs = { input: InputSubGraph } export type Organization = { __typename?: 'Organization' apiKeys: Array id: Scalars['ID']['output'] name: Scalars['String']['output'] users: Array } export type Query = { __typename?: 'Query' allOrganizations: Array latestSchema: SchemaUpdate organizations: Array supergraph: Supergraph } export type QueryLatestSchemaArgs = { ref: Scalars['String']['input'] } export type QuerySupergraphArgs = { isAfter?: InputMaybe ref: Scalars['String']['input'] } export type SchemaUpdate = { __typename?: 'SchemaUpdate' cosmoRouterConfig?: Maybe id: Scalars['ID']['output'] ref: Scalars['String']['output'] subGraphs: Array } export type SubGraph = { __typename?: 'SubGraph' changedAt: Scalars['Time']['output'] changedBy: Scalars['String']['output'] id: Scalars['ID']['output'] sdl: Scalars['String']['output'] service: Scalars['String']['output'] url?: Maybe wsUrl?: Maybe } export type SubGraphs = { __typename?: 'SubGraphs' id: Scalars['ID']['output'] minDelaySeconds: Scalars['Int']['output'] sdl: Scalars['String']['output'] subGraphs: Array } export type Subscription = { __typename?: 'Subscription' schemaUpdates: SchemaUpdate } export type SubscriptionSchemaUpdatesArgs = { ref: Scalars['String']['input'] } export type Supergraph = SubGraphs | Unchanged export type Unchanged = { __typename?: 'Unchanged' id: Scalars['ID']['output'] minDelaySeconds: Scalars['Int']['output'] } export type User = { __typename?: 'User' id: Scalars['String']['output'] } export type OrganizationsQueryVariables = Exact<{ [key: string]: never }> export type OrganizationsQuery = { __typename?: 'Query'; organizations: Array<{ __typename?: 'Organization'; id: string; name: string; users: Array<{ __typename?: 'User'; id: string }>; apiKeys: Array<{ __typename?: 'APIKey'; id: string; name: string; refs: Array; read: boolean; publish: boolean }> }> } export type AllOrganizationsQueryVariables = Exact<{ [key: string]: never }> export type AllOrganizationsQuery = { __typename?: 'Query'; allOrganizations: Array<{ __typename?: 'Organization'; id: string; name: string; users: Array<{ __typename?: 'User'; id: string }>; apiKeys: Array<{ __typename?: 'APIKey'; id: string; name: string; refs: Array; read: boolean; publish: boolean }> }> } export type LatestSchemaQueryVariables = Exact<{ ref: Scalars['String']['input'] }> export type LatestSchemaQuery = { __typename?: 'Query'; latestSchema: { __typename?: 'SchemaUpdate'; ref: string; id: string; cosmoRouterConfig?: string | null; subGraphs: Array<{ __typename?: 'SubGraph'; id: string; service: string; url?: string | null; wsUrl?: string | null; sdl: string; changedBy: string; changedAt: any }> } } export type SupergraphQueryVariables = Exact<{ ref: Scalars['String']['input'] isAfter?: InputMaybe }> export type SupergraphQuery = { __typename?: 'Query', supergraph: | { __typename?: 'SubGraphs'; id: string; sdl: string; subGraphs: Array<{ __typename?: 'SubGraph'; id: string; service: string; url?: string | null; wsUrl?: string | null; sdl: string; changedBy: string; changedAt: any }> } | { __typename?: 'Unchanged'; id: string; minDelaySeconds: number } } export type AddOrganizationMutationVariables = Exact<{ name: Scalars['String']['input'] }> export type AddOrganizationMutation = { __typename?: 'Mutation'; addOrganization: { __typename?: 'Organization'; id: string; name: string; users: Array<{ __typename?: 'User'; id: string }>; apiKeys: Array<{ __typename?: 'APIKey'; id: string; name: string; refs: Array; read: boolean; publish: boolean }> } } export type AddUserToOrganizationMutationVariables = Exact<{ organizationId: Scalars['ID']['input'] userId: Scalars['String']['input'] }> export type AddUserToOrganizationMutation = { __typename?: 'Mutation'; addUserToOrganization: { __typename?: 'Organization'; id: string; name: string; users: Array<{ __typename?: 'User'; id: string }>; apiKeys: Array<{ __typename?: 'APIKey'; id: string; name: string; refs: Array; read: boolean; publish: boolean }> } } export type AddApiKeyMutationVariables = Exact<{ input: InputApiKey }> export type AddApiKeyMutation = { __typename?: 'Mutation'; addAPIKey: { __typename?: 'APIKey'; id: string; name: string; key?: string | null; refs: Array; read: boolean; publish: boolean; organization: { __typename?: 'Organization'; id: string; name: string } } } export type RemoveApiKeyMutationVariables = Exact<{ organizationId: Scalars['ID']['input'] keyName: Scalars['String']['input'] }> export type RemoveApiKeyMutation = { __typename?: 'Mutation'; removeAPIKey: { __typename?: 'Organization'; id: string; name: string; users: Array<{ __typename?: 'User'; id: string }>; apiKeys: Array<{ __typename?: 'APIKey'; id: string; name: string; refs: Array; read: boolean; publish: boolean }> } } export type RemoveOrganizationMutationVariables = Exact<{ organizationId: Scalars['ID']['input'] }> export type RemoveOrganizationMutation = { __typename?: 'Mutation'; removeOrganization: boolean } export const OrganizationsDocument = gql` query Organizations { organizations { id name users { id } apiKeys { id name refs read publish } } } ` /** * __useOrganizationsQuery__ * * To run a query within a Vue component, call `useOrganizationsQuery` and pass it any options that fit your needs. * When your component renders, `useOrganizationsQuery` returns an object from Apollo Client that contains result, loading and error properties * you can use to render your UI. * * @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options; * * @example * const { result, loading, error } = useOrganizationsQuery(); */ export function useOrganizationsQuery(options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { return VueApolloComposable.useQuery(OrganizationsDocument, {}, options) } export function useOrganizationsLazyQuery(options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { return VueApolloComposable.useLazyQuery(OrganizationsDocument, {}, options) } export type OrganizationsQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn export const AllOrganizationsDocument = gql` query AllOrganizations { allOrganizations { id name users { id } apiKeys { id name refs read publish } } } ` /** * __useAllOrganizationsQuery__ * * To run a query within a Vue component, call `useAllOrganizationsQuery` and pass it any options that fit your needs. * When your component renders, `useAllOrganizationsQuery` returns an object from Apollo Client that contains result, loading and error properties * you can use to render your UI. * * @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options; * * @example * const { result, loading, error } = useAllOrganizationsQuery(); */ export function useAllOrganizationsQuery(options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { return VueApolloComposable.useQuery(AllOrganizationsDocument, {}, options) } export function useAllOrganizationsLazyQuery(options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { return VueApolloComposable.useLazyQuery(AllOrganizationsDocument, {}, options) } export type AllOrganizationsQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn export const LatestSchemaDocument = gql` query LatestSchema($ref: String!) { latestSchema(ref: $ref) { ref id subGraphs { id service url wsUrl sdl changedBy changedAt } cosmoRouterConfig } } ` /** * __useLatestSchemaQuery__ * * To run a query within a Vue component, call `useLatestSchemaQuery` and pass it any options that fit your needs. * When your component renders, `useLatestSchemaQuery` returns an object from Apollo Client that contains result, loading and error properties * you can use to render your UI. * * @param variables that will be passed into the query * @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options; * * @example * const { result, loading, error } = useLatestSchemaQuery({ * ref: // value for 'ref' * }); */ export function useLatestSchemaQuery(variables: LatestSchemaQueryVariables | VueCompositionApi.Ref | ReactiveFunction, options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { return VueApolloComposable.useQuery(LatestSchemaDocument, variables, options) } export function useLatestSchemaLazyQuery(variables?: LatestSchemaQueryVariables | VueCompositionApi.Ref | ReactiveFunction, options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { return VueApolloComposable.useLazyQuery(LatestSchemaDocument, variables, options) } export type LatestSchemaQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn export const SupergraphDocument = gql` query Supergraph($ref: String!, $isAfter: String) { supergraph(ref: $ref, isAfter: $isAfter) { ... on SubGraphs { id sdl subGraphs { id service url wsUrl sdl changedBy changedAt } } ... on Unchanged { id minDelaySeconds } } } ` /** * __useSupergraphQuery__ * * To run a query within a Vue component, call `useSupergraphQuery` and pass it any options that fit your needs. * When your component renders, `useSupergraphQuery` returns an object from Apollo Client that contains result, loading and error properties * you can use to render your UI. * * @param variables that will be passed into the query * @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options; * * @example * const { result, loading, error } = useSupergraphQuery({ * ref: // value for 'ref' * isAfter: // value for 'isAfter' * }); */ export function useSupergraphQuery(variables: SupergraphQueryVariables | VueCompositionApi.Ref | ReactiveFunction, options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { return VueApolloComposable.useQuery(SupergraphDocument, variables, options) } export function useSupergraphLazyQuery(variables?: SupergraphQueryVariables | VueCompositionApi.Ref | ReactiveFunction, options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { return VueApolloComposable.useLazyQuery(SupergraphDocument, variables, options) } export type SupergraphQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn export const AddOrganizationDocument = gql` mutation AddOrganization($name: String!) { addOrganization(name: $name) { id name users { id } apiKeys { id name refs read publish } } } ` /** * __useAddOrganizationMutation__ * * To run a mutation, you first call `useAddOrganizationMutation` within a Vue component and pass it any options that fit your needs. * When your component renders, `useAddOrganizationMutation` returns an object that includes: * - A mutate function that you can call at any time to execute the mutation * - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return * * @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options; * * @example * const { mutate, loading, error, onDone } = useAddOrganizationMutation({ * variables: { * name: // value for 'name' * }, * }); */ export function useAddOrganizationMutation(options: VueApolloComposable.UseMutationOptions | ReactiveFunction> = {}) { return VueApolloComposable.useMutation(AddOrganizationDocument, options) } export type AddOrganizationMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn export const AddUserToOrganizationDocument = gql` mutation AddUserToOrganization($organizationId: ID!, $userId: String!) { addUserToOrganization(organizationId: $organizationId, userId: $userId) { id name users { id } apiKeys { id name refs read publish } } } ` /** * __useAddUserToOrganizationMutation__ * * To run a mutation, you first call `useAddUserToOrganizationMutation` within a Vue component and pass it any options that fit your needs. * When your component renders, `useAddUserToOrganizationMutation` returns an object that includes: * - A mutate function that you can call at any time to execute the mutation * - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return * * @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options; * * @example * const { mutate, loading, error, onDone } = useAddUserToOrganizationMutation({ * variables: { * organizationId: // value for 'organizationId' * userId: // value for 'userId' * }, * }); */ export function useAddUserToOrganizationMutation(options: VueApolloComposable.UseMutationOptions | ReactiveFunction> = {}) { return VueApolloComposable.useMutation(AddUserToOrganizationDocument, options) } export type AddUserToOrganizationMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn export const AddApiKeyDocument = gql` mutation AddAPIKey($input: InputAPIKey!) { addAPIKey(input: $input) { id name key organization { id name } refs read publish } } ` /** * __useAddApiKeyMutation__ * * To run a mutation, you first call `useAddApiKeyMutation` within a Vue component and pass it any options that fit your needs. * When your component renders, `useAddApiKeyMutation` returns an object that includes: * - A mutate function that you can call at any time to execute the mutation * - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return * * @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options; * * @example * const { mutate, loading, error, onDone } = useAddApiKeyMutation({ * variables: { * input: // value for 'input' * }, * }); */ export function useAddApiKeyMutation(options: VueApolloComposable.UseMutationOptions | ReactiveFunction> = {}) { return VueApolloComposable.useMutation(AddApiKeyDocument, options) } export type AddApiKeyMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn export const RemoveApiKeyDocument = gql` mutation RemoveAPIKey($organizationId: ID!, $keyName: String!) { removeAPIKey(organizationId: $organizationId, keyName: $keyName) { id name users { id } apiKeys { id name refs read publish } } } ` /** * __useRemoveApiKeyMutation__ * * To run a mutation, you first call `useRemoveApiKeyMutation` within a Vue component and pass it any options that fit your needs. * When your component renders, `useRemoveApiKeyMutation` returns an object that includes: * - A mutate function that you can call at any time to execute the mutation * - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return * * @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options; * * @example * const { mutate, loading, error, onDone } = useRemoveApiKeyMutation({ * variables: { * organizationId: // value for 'organizationId' * keyName: // value for 'keyName' * }, * }); */ export function useRemoveApiKeyMutation(options: VueApolloComposable.UseMutationOptions | ReactiveFunction> = {}) { return VueApolloComposable.useMutation(RemoveApiKeyDocument, options) } export type RemoveApiKeyMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn export const RemoveOrganizationDocument = gql` mutation RemoveOrganization($organizationId: ID!) { removeOrganization(organizationId: $organizationId) } ` /** * __useRemoveOrganizationMutation__ * * To run a mutation, you first call `useRemoveOrganizationMutation` within a Vue component and pass it any options that fit your needs. * When your component renders, `useRemoveOrganizationMutation` returns an object that includes: * - A mutate function that you can call at any time to execute the mutation * - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return * * @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options; * * @example * const { mutate, loading, error, onDone } = useRemoveOrganizationMutation({ * variables: { * organizationId: // value for 'organizationId' * }, * }); */ export function useRemoveOrganizationMutation(options: VueApolloComposable.UseMutationOptions | ReactiveFunction> = {}) { return VueApolloComposable.useMutation(RemoveOrganizationDocument, options) } export type RemoveOrganizationMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn