You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
2.5KB

  1. import gql from 'graphql-tag';
  2. import { Injectable } from '@angular/core';
  3. import * as Apollo from 'apollo-angular';
  4. export type Maybe<T> = T | null;
  5. export type Exact<T extends { [key: string]: any }> = { [K in keyof T]: T[K] };
  6. /** All built-in and custom scalars, mapped to their actual values */
  7. export type Scalars = {
  8. ID: string;
  9. String: string;
  10. Boolean: boolean;
  11. Int: number;
  12. Float: number;
  13. /** The `Upload` scalar type represents a file upload. */
  14. Upload: any;
  15. };
  16. export type Pizza = {
  17. __typename?: 'Pizza';
  18. id: Scalars['ID'];
  19. name: Scalars['String'];
  20. toppings: Array<Topping>;
  21. };
  22. export type Topping = {
  23. __typename?: 'Topping';
  24. id: Scalars['ID'];
  25. name: Scalars['String'];
  26. };
  27. export type Query = {
  28. __typename?: 'Query';
  29. getPizzaById: Pizza;
  30. getToppingById: Topping;
  31. getPizzaByName: Pizza;
  32. getToppingByName: Topping;
  33. listPizza: Array<Maybe<Pizza>>;
  34. listTopping: Array<Maybe<Topping>>;
  35. };
  36. export type QueryGetPizzaByIdArgs = {
  37. pizzaId: Scalars['ID'];
  38. };
  39. export type QueryGetToppingByIdArgs = {
  40. toppingId: Scalars['ID'];
  41. };
  42. export type QueryGetPizzaByNameArgs = {
  43. pizzaName: Scalars['ID'];
  44. };
  45. export type QueryGetToppingByNameArgs = {
  46. toppingName: Scalars['ID'];
  47. };
  48. export enum CacheControlScope {
  49. Public = 'PUBLIC',
  50. Private = 'PRIVATE'
  51. }
  52. export type ListPizzaWithToppingQueryVariables = Exact<{ [key: string]: never; }>;
  53. export type ListPizzaWithToppingQuery = (
  54. { __typename?: 'Query' }
  55. & { listPizza: Array<Maybe<(
  56. { __typename?: 'Pizza' }
  57. & Pick<Pizza, 'id' | 'name'>
  58. & { toppings: Array<(
  59. { __typename?: 'Topping' }
  60. & Pick<Topping, 'name'>
  61. )> }
  62. )>> }
  63. );
  64. export type ListPizzaQueryVariables = Exact<{ [key: string]: never; }>;
  65. export type ListPizzaQuery = (
  66. { __typename?: 'Query' }
  67. & { listPizza: Array<Maybe<(
  68. { __typename?: 'Pizza' }
  69. & Pick<Pizza, 'id' | 'name'>
  70. )>> }
  71. );
  72. export const ListPizzaWithToppingDocument = gql`
  73. query ListPizzaWithTopping {
  74. listPizza {
  75. id
  76. name
  77. toppings {
  78. name
  79. }
  80. }
  81. }
  82. `;
  83. @Injectable({
  84. providedIn: 'root'
  85. })
  86. export class ListPizzaWithToppingGQL extends Apollo.Query<ListPizzaWithToppingQuery, ListPizzaWithToppingQueryVariables> {
  87. document = ListPizzaWithToppingDocument;
  88. }
  89. export const ListPizzaDocument = gql`
  90. query ListPizza {
  91. listPizza {
  92. id
  93. name
  94. }
  95. }
  96. `;
  97. @Injectable({
  98. providedIn: 'root'
  99. })
  100. export class ListPizzaGQL extends Apollo.Query<ListPizzaQuery, ListPizzaQueryVariables> {
  101. document = ListPizzaDocument;
  102. }