import gql from 'graphql-tag';
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: any }> = { [K in keyof T]: T[K] };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
  ID: string;
  String: string;
  Boolean: boolean;
  Int: number;
  Float: number;
  /** The `Upload` scalar type represents a file upload. */
  Upload: any;
};



export type Pizza = {
  __typename?: 'Pizza';
  id: Scalars['ID'];
  name: Scalars['String'];
  toppings: Array<Topping>;
};

export type Topping = {
  __typename?: 'Topping';
  id: Scalars['ID'];
  name: Scalars['String'];
};

export type Query = {
  __typename?: 'Query';
  getPizzaById: Pizza;
  getToppingById: Topping;
  getPizzaByName: Pizza;
  getToppingByName: Topping;
  listPizza: Array<Maybe<Pizza>>;
  listTopping: Array<Maybe<Topping>>;
};


export type QueryGetPizzaByIdArgs = {
  pizzaId: Scalars['ID'];
};


export type QueryGetToppingByIdArgs = {
  toppingId: Scalars['ID'];
};


export type QueryGetPizzaByNameArgs = {
  pizzaName: Scalars['ID'];
};


export type QueryGetToppingByNameArgs = {
  toppingName: Scalars['ID'];
};

export enum CacheControlScope {
  Public = 'PUBLIC',
  Private = 'PRIVATE'
}


export type ListPizzaWithToppingQueryVariables = Exact<{ [key: string]: never; }>;


export type ListPizzaWithToppingQuery = (
  { __typename?: 'Query' }
  & { listPizza: Array<Maybe<(
    { __typename?: 'Pizza' }
    & Pick<Pizza, 'id' | 'name'>
    & { toppings: Array<(
      { __typename?: 'Topping' }
      & Pick<Topping, 'name'>
    )> }
  )>> }
);

export type ListPizzaQueryVariables = Exact<{ [key: string]: never; }>;


export type ListPizzaQuery = (
  { __typename?: 'Query' }
  & { listPizza: Array<Maybe<(
    { __typename?: 'Pizza' }
    & Pick<Pizza, 'id' | 'name'>
  )>> }
);

export const ListPizzaWithToppingDocument = gql`
    query ListPizzaWithTopping {
  listPizza {
    id
    name
    toppings {
      name
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class ListPizzaWithToppingGQL extends Apollo.Query<ListPizzaWithToppingQuery, ListPizzaWithToppingQueryVariables> {
    document = ListPizzaWithToppingDocument;
    
  }
export const ListPizzaDocument = gql`
    query ListPizza {
  listPizza {
    id
    name
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class ListPizzaGQL extends Apollo.Query<ListPizzaQuery, ListPizzaQueryVariables> {
    document = ListPizzaDocument;
    
  }