{"version":3,"file":"xxmachina-components-services-graphql.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/graphql/graphql.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/graphql/xxmachina-components-services-graphql.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs';\n\n/**\n * @deprecated use GraphqlService(@mxxmachina/common/services/graphql) instead\n */\n@Injectable({ providedIn: 'root' })\nexport class GraphqlService {\n\n  constructor(\n    private http: HttpClient,\n  ) { }\n\n  graphql(props: {query?: string, variables?: object, operationName?: string}): Observable<any> {\n    // const url = `http://localhost:3333/api/graphql`;\n    const url = `/api/graphql`;\n    return this.http.post(url, props, {\n      headers: {\n        'Content-Type': 'application/json',\n      }\n    });\n  }\n\n  // getGraphqlSchema(): Observable<any> {\n  //   return this.graphql({\n  //     operationName: \"IntrospectionQuery\",\n  //     query: \"query IntrospectionQuery {\\n  __schema {\\n    queryType {\\n      name\\n    }\\n    mutationType {\\n      name\\n    }\\n    subscriptionType {\\n      name\\n    }\\n    types {\\n      ...FullType\\n    }\\n    directives {\\n      name\\n      description\\n      locations\\n      args {\\n        ...InputValue\\n      }\\n    }\\n  }\\n}\\n\\nfragment FullType on __Type {\\n  kind\\n  name\\n  description\\n  fields(includeDeprecated: true) {\\n    name\\n    description\\n    args {\\n      ...InputValue\\n    }\\n    type {\\n      ...TypeRef\\n    }\\n    isDeprecated\\n    deprecationReason\\n  }\\n  inputFields {\\n    ...InputValue\\n  }\\n  interfaces {\\n    ...TypeRef\\n  }\\n  enumValues(includeDeprecated: true) {\\n    name\\n    description\\n    isDeprecated\\n    deprecationReason\\n  }\\n  possibleTypes {\\n    ...TypeRef\\n  }\\n}\\n\\nfragment InputValue on __InputValue {\\n  name\\n  description\\n  type {\\n    ...TypeRef\\n  }\\n  defaultValue\\n}\\n\\nfragment TypeRef on __Type {\\n  kind\\n  name\\n  ofType {\\n    kind\\n    name\\n    ofType {\\n      kind\\n      name\\n      ofType {\\n        kind\\n        name\\n        ofType {\\n          kind\\n          name\\n          ofType {\\n            kind\\n            name\\n            ofType {\\n              kind\\n              name\\n              ofType {\\n                kind\\n                name\\n              }\\n            }\\n          }\\n        }\\n      }\\n    }\\n  }\\n}\\n\",\n  //     variables: {}\n  //   });\n  // }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA;;AAEG;MAEU,cAAc,CAAA;AAGf,IAAA,IAAA;AADV,IAAA,WAAA,CACU,IAAgB,EAAA;QAAhB,IAAA,CAAA,IAAI,GAAJ,IAAI;IACV;AAEJ,IAAA,OAAO,CAAC,KAAmE,EAAA;;QAEzE,MAAM,GAAG,GAAG,CAAA,YAAA,CAAc;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE;AAChC,YAAA,OAAO,EAAE;AACP,gBAAA,cAAc,EAAE,kBAAkB;AACnC;AACF,SAAA,CAAC;IACJ;uGAdW,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA;;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACPlC;;AAEG;;;;"}