@teambit/graphql 1.0.281 → 1.0.283

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.harmony/graphql@1.0.281" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.harmony/graphql@1.0.283" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/graphql-preview"]=t():e["teambit.harmony/graphql-preview"]=t()}(self,(()=>(()=>{"use strict";var e={46069:(e,t,o)=>{var r={id:"teambit.harmony/graphql@1.0.281",homepage:"https://bit.cloud/teambit/harmony/graphql",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-grphql.svg"}));a.__bit_component=r,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>d,compositions_metadata:()=>f,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>l});var t=o(46069);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},p.apply(this,arguments)}var c={},s="wrapper";function l(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(s,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const d=[t],u=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/graphql-preview"]=t():e["teambit.harmony/graphql-preview"]=t()}(self,(()=>(()=>{"use strict";var e={67771:(e,t,o)=>{var r={id:"teambit.harmony/graphql@1.0.283",homepage:"https://bit.cloud/teambit/harmony/graphql",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-grphql.svg"}));a.__bit_component=r,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>d,compositions_metadata:()=>f,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>s});var t=o(67771);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},p.apply(null,arguments)}var c={},l="wrapper";function s(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||{}.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(l,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}s.isMDXComponent=!0;const d=[t],u=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
@@ -3967,7 +3967,7 @@
3967
3967
  "componentId": {
3968
3968
  "scope": "teambit.harmony",
3969
3969
  "name": "graphql",
3970
- "version": "1.0.281"
3970
+ "version": "1.0.283"
3971
3971
  },
3972
3972
  "taggedModuleExports": []
3973
3973
  }
@@ -67,7 +67,7 @@ function _ws() {
67
67
  };
68
68
  return data;
69
69
  }
70
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
71
71
  async function getRemoteSchema({
72
72
  uri,
73
73
  subscriptionsUri
@@ -1 +1 @@
1
- {"version":3,"names":["_nodeFetch","data","_interopRequireDefault","require","_apolloLinkContext","_apolloLinkHttp","_apolloServer","_apolloLinkWs","_apolloLink","_apolloUtilities","_subscriptionsTransportWs","_ws","obj","__esModule","default","getRemoteSchema","uri","subscriptionsUri","wrappingLink","ApolloLink","operation","forward","map","response","context","getContext","headers","get","graphqlContext","res","setHeader","http","HttpLink","fetch","httpLink","setContext","request","previousContext","concat","makeRemoteExecutableSchema","schema","introspectSchema","link","client","SubscriptionClient","reconnect","ws","wsLink","WebSocketLink","split","definition","getMainDefinition","query","kind","createRemoteSchemas","servers","schemasP","server","Promise","all"],"sources":["create-remote-schemas.ts"],"sourcesContent":["import fetch from 'node-fetch';\nimport { setContext } from 'apollo-link-context';\nimport { HttpLink } from 'apollo-link-http';\nimport { makeRemoteExecutableSchema, introspectSchema } from 'apollo-server';\nimport { WebSocketLink } from 'apollo-link-ws';\nimport { split, ApolloLink } from 'apollo-link';\nimport { getMainDefinition } from 'apollo-utilities';\nimport { SubscriptionClient } from 'subscriptions-transport-ws';\nimport ws from 'ws';\nimport { GraphQLServer } from '../graphql-server';\n\nasync function getRemoteSchema({ uri, subscriptionsUri }) {\n const wrappingLink = new ApolloLink((operation, forward) => {\n return forward(operation).map((response) => {\n const context = operation.getContext();\n if (context?.response?.headers?.get('set-cookie')) {\n context?.graphqlContext?.res?.setHeader('set-cookie', context?.response?.headers?.get('set-cookie'));\n }\n return response;\n });\n });\n // @ts-ignore\n const http = new HttpLink({ uri, fetch });\n const httpLink = setContext((request, previousContext) => {\n return {\n headers: previousContext?.graphqlContext?.headers,\n };\n })\n .concat(wrappingLink)\n .concat(http);\n\n if (!subscriptionsUri) {\n return makeRemoteExecutableSchema({\n schema: await introspectSchema(httpLink),\n link: httpLink,\n });\n }\n\n // Create WebSocket link with custom client\n const client = new SubscriptionClient(subscriptionsUri, { reconnect: true }, ws);\n const wsLink = new WebSocketLink(client);\n\n // Using the ability to split links, we can send data to each link\n // depending on what kind of operation is being sent\n const link = split(\n (operation) => {\n const definition = getMainDefinition(operation.query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'subscription';\n },\n wsLink,\n httpLink\n );\n\n return makeRemoteExecutableSchema({\n schema: await introspectSchema(httpLink),\n link,\n });\n}\n\nexport async function createRemoteSchemas(servers: GraphQLServer[]) {\n const schemasP = servers.map(async (server) => {\n return getRemoteSchema({\n uri: server.uri,\n subscriptionsUri: server.subscriptionsUri,\n });\n });\n\n return Promise.all(schemasP);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,cAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,aAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA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AAQ,CAAC;AAC9B","ignoreList":[]}
1
+ {"version":3,"names":["_nodeFetch","data","_interopRequireDefault","require","_apolloLinkContext","_apolloLinkHttp","_apolloServer","_apolloLinkWs","_apolloLink","_apolloUtilities","_subscriptionsTransportWs","_ws","e","__esModule","default","getRemoteSchema","uri","subscriptionsUri","wrappingLink","ApolloLink","operation","forward","map","response","context","getContext","headers","get","graphqlContext","res","setHeader","http","HttpLink","fetch","httpLink","setContext","request","previousContext","concat","makeRemoteExecutableSchema","schema","introspectSchema","link","client","SubscriptionClient","reconnect","ws","wsLink","WebSocketLink","split","definition","getMainDefinition","query","kind","createRemoteSchemas","servers","schemasP","server","Promise","all"],"sources":["create-remote-schemas.ts"],"sourcesContent":["import fetch from 'node-fetch';\nimport { setContext } from 'apollo-link-context';\nimport { HttpLink } from 'apollo-link-http';\nimport { makeRemoteExecutableSchema, introspectSchema } from 'apollo-server';\nimport { WebSocketLink } from 'apollo-link-ws';\nimport { split, ApolloLink } from 'apollo-link';\nimport { getMainDefinition } from 'apollo-utilities';\nimport { SubscriptionClient } from 'subscriptions-transport-ws';\nimport ws from 'ws';\nimport { GraphQLServer } from '../graphql-server';\n\nasync function getRemoteSchema({ uri, subscriptionsUri }) {\n const wrappingLink = new ApolloLink((operation, forward) => {\n return forward(operation).map((response) => {\n const context = operation.getContext();\n if (context?.response?.headers?.get('set-cookie')) {\n context?.graphqlContext?.res?.setHeader('set-cookie', context?.response?.headers?.get('set-cookie'));\n }\n return response;\n });\n });\n // @ts-ignore\n const http = new HttpLink({ uri, fetch });\n const httpLink = setContext((request, previousContext) => {\n return {\n headers: previousContext?.graphqlContext?.headers,\n };\n })\n .concat(wrappingLink)\n .concat(http);\n\n if (!subscriptionsUri) {\n return makeRemoteExecutableSchema({\n schema: await introspectSchema(httpLink),\n link: httpLink,\n });\n }\n\n // Create WebSocket link with custom client\n const client = new SubscriptionClient(subscriptionsUri, { reconnect: true }, ws);\n const wsLink = new WebSocketLink(client);\n\n // Using the ability to split links, we can send data to each link\n // depending on what kind of operation is being sent\n const link = split(\n (operation) => {\n const definition = getMainDefinition(operation.query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'subscription';\n },\n wsLink,\n httpLink\n );\n\n return makeRemoteExecutableSchema({\n schema: await introspectSchema(httpLink),\n link,\n });\n}\n\nexport async function createRemoteSchemas(servers: GraphQLServer[]) {\n const schemasP = servers.map(async (server) => {\n return getRemoteSchema({\n uri: server.uri,\n subscriptionsUri: server.subscriptionsUri,\n });\n });\n\n return Promise.all(schemasP);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,cAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,aAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,iBAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,gBAAA,YAAAA,CAAA;IAAA,OAAAR,IAA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,CAAC,CAAC,CACCY,MAAM,CAACpB,YAAY,CAAC,CACpBoB,MAAM,CAACP,IAAI,CAAC;EAEf,IAAI,CAACd,gBAAgB,EAAE;IACrB,OAAO,IAAAsB,0CAA0B,EAAC;MAChCC,MAAM,EAAE,MAAM,IAAAC,gCAAgB,EAACP,QAAQ,CAAC;MACxCQ,IAAI,EAAER;IACR,CAAC,CAAC;EACJ;;EAEA;EACA,MAAMS,MAAM,GAAG,KAAIC,8CAAkB,EAAC3B,gBAAgB,EAAE;IAAE4B,SAAS,EAAE;EAAK,CAAC,EAAEC,aAAE,CAAC;EAChF,MAAMC,MAAM,GAAG,KAAIC,6BAAa,EAACL,MAAM,CAAC;;EAExC;EACA;EACA,MAAMD,IAAI,GAAG,IAAAO,mBAAK,EACf7B,SAAS,IAAK;IACb,MAAM8B,UAAU,GAAG,IAAAC,oCAAiB,EAAC/B,SAAS,CAACgC,KAAK,CAAC;IACrD,OAAOF,UAAU,CAACG,IAAI,KAAK,qBAAqB,IAAIH,UAAU,CAAC9B,SAAS,KAAK,cAAc;EAC7F,CAAC,EACD2B,MAAM,EACNb,QACF,CAAC;EAED,OAAO,IAAAK,0CAA0B,EAAC;IAChCC,MAAM,EAAE,MAAM,IAAAC,gCAAgB,EAACP,QAAQ,CAAC;IACxCQ;EACF,CAAC,CAAC;AACJ;AAEO,eAAeY,mBAAmBA,CAACC,OAAwB,EAAE;EAClE,MAAMC,QAAQ,GAAGD,OAAO,CAACjC,GAAG,CAAC,MAAOmC,MAAM,IAAK;IAC7C,OAAO1C,eAAe,CAAC;MACrBC,GAAG,EAAEyC,MAAM,CAACzC,GAAG;MACfC,gBAAgB,EAAEwC,MAAM,CAACxC;IAC3B,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOyC,OAAO,CAACC,GAAG,CAACH,QAAQ,CAAC;AAC9B","ignoreList":[]}
@@ -18,7 +18,7 @@ function _client() {
18
18
  };
19
19
  return data;
20
20
  }
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
22
  function GraphQLProvider({
23
23
  client,
24
24
  children
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_client","obj","__esModule","default","GraphQLProvider","client","children","createElement","ApolloProvider"],"sources":["graphql-provider.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { ApolloProvider } from '@apollo/client';\nimport type { GraphQLClient } from '../graphql.ui.runtime';\n\nexport type GraphQLProviderProps = {\n client: GraphQLClient<any>;\n children: ReactNode;\n};\n\nexport function GraphQLProvider({ client, children }: GraphQLProviderProps) {\n return <ApolloProvider client={client}>{children}</ApolloProvider>;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgD,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQzC,SAASG,eAAeA,CAAC;EAAEC,MAAM;EAAEC;AAA+B,CAAC,EAAE;EAC1E,oBAAOV,MAAA,GAAAO,OAAA,CAAAI,aAAA,CAACP,OAAA,GAAAQ,cAAc;IAACH,MAAM,EAAEA;EAAO,GAAEC,QAAyB,CAAC;AACpE","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_client","e","__esModule","default","GraphQLProvider","client","children","createElement","ApolloProvider"],"sources":["graphql-provider.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { ApolloProvider } from '@apollo/client';\nimport type { GraphQLClient } from '../graphql.ui.runtime';\n\nexport type GraphQLProviderProps = {\n client: GraphQLClient<any>;\n children: ReactNode;\n};\n\nexport function GraphQLProvider({ client, children }: GraphQLProviderProps) {\n return <ApolloProvider client={client}>{children}</ApolloProvider>;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgD,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQzC,SAASG,eAAeA,CAAC;EAAEC,MAAM;EAAEC;AAA+B,CAAC,EAAE;EAC1E,oBAAOV,MAAA,GAAAO,OAAA,CAAAI,aAAA,CAACP,OAAA,GAAAQ,cAAc;IAACH,MAAM,EAAEA;EAAO,GAAEC,QAAyB,CAAC;AACpE","ignoreList":[]}
@@ -11,7 +11,7 @@ function _react() {
11
11
  };
12
12
  return data;
13
13
  }
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
15
  const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
16
16
  style: {
17
17
  height: '100%',
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["graphql.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/brands/logo-grphql.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAA+C,CAAE,CAC7E,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","e","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["graphql.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/brands/logo-grphql.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAA+C,CAAE,CAC7E,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -123,10 +123,10 @@ function _graphql2() {
123
123
  };
124
124
  return data;
125
125
  }
126
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
126
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
127
127
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
128
128
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
129
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
129
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
130
130
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
131
131
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
132
132
  let Verb = exports.Verb = /*#__PURE__*/function (Verb) {
@@ -1 +1 @@
1
- {"version":3,"names":["_schema","data","require","_graphqlDisableIntrospection","_interopRequireDefault","_core","_cli","_harmony","_logger","_express","_expressGraphql","_toolboxNetwork","_graphql","_graphqlSubscriptions","_http","_httpProxy","_subscriptionsTransportWs","_cors","_createRemoteSchemas","_graphql2","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","Verb","exports","GraphqlMain","constructor","config","moduleSlot","context","logger","graphQLServerSlot","pubSubSlot","Map","pubsub","pubSubSlots","values","PubSub","getSchema","aspectId","get","getSchemas","aspectIds","toArray","includes","map","schema","createServer","options","graphiql","disableIntrospection","localSchema","createRootModule","schemaSlot","remoteSchemas","createRemoteSchemas","schemas","concat","x","mergeSchemas","app","express","disableCors","use","cors","origin","callback","credentials","graphqlHTTP","request","res","params","customFormatErrorFn","err","error","assign","ERR_CODE","originalError","errors","name","HTTP_CODE","code","rootValue","validationRules","NoIntrospection","undefined","server","subscriptionsPort","subscriptionsPortRange","subscriptionServerPort","getPort","port","createSubscription","proxySubscription","registerServer","register","registerPubSub","Error","listen","serverPort","subServer","info","subscriptionsPath","range","from","to","Port","websocketServer","response","writeHead","end","debug","SubscriptionServer","execute","subscribe","onConnect","onWsConnect","path","proxServer","httpProxy","createProxyServer","on","req","socket","head","url","ws","target","host","modules","buildModules","GraphQLModule","imports","schemaSlots","extensionId","moduleDeps","getModuleDependencies","module","typeDefs","resolvers","schemaDirectives","session","verb","headers","READ","set","extension","extensions","deps","getDependencies","ids","dep","id","Array","entries","depId","provider","loggerFactory","createLogger","GraphqlAspect","graphqlMain","Slot","withType","MainRuntime","LoggerAspect","addRuntime"],"sources":["graphql.main.runtime.ts"],"sourcesContent":["import { mergeSchemas } from '@graphql-tools/schema';\nimport NoIntrospection from 'graphql-disable-introspection';\nimport { GraphQLModule } from '@graphql-modules/core';\nimport { MainRuntime } from '@teambit/cli';\nimport { Harmony, Slot, SlotRegistry } from '@teambit/harmony';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport express, { Express } from 'express';\nimport { graphqlHTTP } from 'express-graphql';\nimport { Port } from '@teambit/toolbox.network.get-port';\nimport { execute, subscribe } from 'graphql';\nimport { PubSubEngine, PubSub } from 'graphql-subscriptions';\nimport { createServer, Server } from 'http';\nimport httpProxy from 'http-proxy';\nimport { SubscriptionServer } from 'subscriptions-transport-ws';\nimport cors from 'cors';\nimport { GraphQLServer } from './graphql-server';\nimport { createRemoteSchemas } from './create-remote-schemas';\nimport { GraphqlAspect } from './graphql.aspect';\nimport { Schema } from './schema';\n\nexport enum Verb {\n WRITE = 'write',\n READ = 'read',\n}\n\nexport type GraphQLConfig = {\n port: number;\n subscriptionsPortRange: number[];\n subscriptionsPath: string;\n disableCors?: boolean;\n};\n\nexport type GraphQLServerSlot = SlotRegistry<GraphQLServer>;\n\nexport type SchemaSlot = SlotRegistry<Schema>;\n\nexport type PubSubSlot = SlotRegistry<PubSubEngine>;\n\nexport type GraphQLServerOptions = {\n schemaSlot?: SchemaSlot;\n app?: Express;\n graphiql?: boolean;\n disableIntrospection?: boolean;\n remoteSchemas?: GraphQLServer[];\n subscriptionsPortRange?: number[];\n onWsConnect?: Function;\n};\n\nexport class GraphqlMain {\n constructor(\n /**\n * extension config\n */\n readonly config: GraphQLConfig,\n\n /**\n * slot for registering graphql modules\n */\n private moduleSlot: SchemaSlot,\n\n /**\n * harmony context.\n */\n private context: Harmony,\n\n /**\n * logger extension.\n */\n readonly logger: Logger,\n\n private graphQLServerSlot: GraphQLServerSlot,\n\n /**\n * graphql pubsub. allows to emit events to clients.\n */\n private pubSubSlot: PubSubSlot\n ) {}\n\n get pubsub(): PubSubEngine {\n const pubSubSlots = this.pubSubSlot.values();\n if (pubSubSlots.length) return pubSubSlots[0];\n return new PubSub();\n }\n\n private modules = new Map<string, GraphQLModule>();\n\n /**\n * returns the schema for a specific aspect by its id.\n */\n getSchema(aspectId: string) {\n return this.moduleSlot.get(aspectId);\n }\n\n /**\n * get multiple schema by aspect ids.\n */\n getSchemas(aspectIds: string[]) {\n return this.moduleSlot\n .toArray()\n .filter(([aspectId]) => {\n return aspectIds.includes(aspectId);\n })\n .map(([, schema]) => {\n return schema;\n });\n }\n\n async createServer(options: GraphQLServerOptions) {\n const { graphiql = true, disableIntrospection } = options;\n const localSchema = this.createRootModule(options.schemaSlot);\n const remoteSchemas = await createRemoteSchemas(options.remoteSchemas || this.graphQLServerSlot.values());\n const schemas = [localSchema.schema].concat(remoteSchemas).filter((x) => x);\n const schema = mergeSchemas({\n schemas,\n });\n\n // TODO: @guy please consider to refactor to express extension.\n const app = options.app || express();\n if (!this.config.disableCors) {\n app.use(\n // @ts-ignore todo: it's not clear what's the issue.\n cors({\n origin(origin, callback) {\n callback(null, true);\n },\n credentials: true,\n })\n );\n }\n\n app.use(\n '/graphql',\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n graphqlHTTP((request, res, params) => ({\n customFormatErrorFn: (err) => {\n this.logger.error('graphql got an error during running the following query:', params);\n this.logger.error('graphql error ', err);\n return Object.assign(err, {\n // @ts-ignore\n ERR_CODE: err?.originalError?.errors?.[0].ERR_CODE || err.originalError?.constructor?.name,\n // @ts-ignore\n HTTP_CODE: err?.originalError?.errors?.[0].HTTP_CODE || err.originalError?.code,\n });\n },\n schema,\n rootValue: request,\n graphiql,\n validationRules: disableIntrospection ? [NoIntrospection] : undefined,\n }))\n );\n\n const server = createServer(app);\n const subscriptionsPort = options.subscriptionsPortRange || this.config.subscriptionsPortRange;\n const subscriptionServerPort = await this.getPort(subscriptionsPort);\n const { port } = await this.createSubscription(options, subscriptionServerPort);\n this.proxySubscription(server, port);\n\n return server;\n }\n\n /**\n * register a new graphql server.\n */\n registerServer(server: GraphQLServer) {\n this.graphQLServerSlot.register(server);\n return this;\n }\n\n /**\n * register a pubsub client\n */\n registerPubSub(pubsub: PubSubEngine) {\n const pubSubSlots = this.pubSubSlot.toArray();\n if (pubSubSlots.length) throw new Error('can not register more then one pubsub provider');\n this.pubSubSlot.register(pubsub);\n return this;\n }\n\n /**\n * start a graphql server.\n */\n async listen(port?: number, server?: Server, app?: Express) {\n const serverPort = port || this.config.port;\n const subServer = server || (await this.createServer({ app }));\n\n subServer.listen(serverPort, () => {\n this.logger.info(`API Server over HTTP is now running on http://localhost:${serverPort}`);\n this.logger.info(\n `API Server over web socket with subscriptions is now running on ws://localhost:${serverPort}/${this.config.subscriptionsPath}`\n );\n });\n }\n\n /**\n * register a new graphql module.\n */\n register(schema: Schema) {\n // const module = new GraphQLModule(schema);\n this.moduleSlot.register(schema);\n return this;\n }\n\n private async getPort(range: number[]) {\n const [from, to] = range;\n return Port.getPort(from, to);\n }\n\n /** create Subscription server with different port */\n\n private async createSubscription(options: GraphQLServerOptions, port: number) {\n // Create WebSocket listener server\n const websocketServer = createServer((request, response) => {\n response.writeHead(404);\n response.end();\n });\n\n // Bind it to port and start listening\n websocketServer.listen(port, () =>\n this.logger.debug(`Websocket Server is now running on http://localhost:${port}`)\n );\n\n const localSchema = this.createRootModule(options.schemaSlot);\n const remoteSchemas = await createRemoteSchemas(options.remoteSchemas || this.graphQLServerSlot.values());\n const schemas = [localSchema.schema].concat(remoteSchemas).filter((x) => x);\n const schema = mergeSchemas({\n schemas,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const subServer = new SubscriptionServer(\n {\n execute,\n subscribe,\n schema,\n onConnect: options.onWsConnect,\n },\n {\n server: websocketServer,\n path: this.config.subscriptionsPath,\n }\n );\n return { subServer, port };\n }\n /** proxy ws Subscription server to avoid conflict with different websocket connections */\n\n private proxySubscription(server: Server, port: number) {\n const proxServer = httpProxy.createProxyServer();\n const subscriptionsPath = this.config.subscriptionsPath;\n server.on('upgrade', function (req, socket, head) {\n if (req.url === subscriptionsPath) {\n proxServer.ws(req, socket, head, { target: { host: 'localhost', port } });\n }\n });\n }\n\n private createRootModule(schemaSlot?: SchemaSlot) {\n const modules = this.buildModules(schemaSlot);\n\n return new GraphQLModule({\n imports: modules,\n });\n }\n\n private buildModules(schemaSlot?: SchemaSlot) {\n const schemaSlots = schemaSlot ? schemaSlot.toArray() : this.moduleSlot.toArray();\n return schemaSlots.map(([extensionId, schema]) => {\n const moduleDeps = this.getModuleDependencies(extensionId);\n\n const module = new GraphQLModule({\n typeDefs: schema.typeDefs,\n resolvers: schema.resolvers,\n schemaDirectives: schema.schemaDirectives,\n imports: moduleDeps,\n context: (session) => {\n return {\n ...session,\n verb: session?.headers?.['x-verb'] || Verb.READ,\n };\n },\n });\n\n this.modules.set(extensionId, module);\n\n return module;\n });\n }\n\n private getModuleDependencies(extensionId: string): GraphQLModule[] {\n const extension = this.context.extensions.get(extensionId);\n if (!extension) throw new Error(`aspect ${extensionId} was not found`);\n const deps = this.context.getDependencies(extension);\n const ids = deps.map((dep) => dep.id);\n\n // @ts-ignore check :TODO why types are breaking here.\n return Array.from(this.modules.entries())\n .map(([depId, module]) => {\n const dep = ids.includes(depId);\n if (!dep) return undefined;\n return module;\n })\n .filter((module) => !!module);\n }\n\n static slots = [Slot.withType<Schema>(), Slot.withType<GraphQLServer>(), Slot.withType<PubSubSlot>()];\n\n static defaultConfig = {\n port: 4000,\n subscriptionsPortRange: [2000, 2100],\n disableCors: false,\n subscriptionsPath: '/subscriptions',\n };\n\n static runtime = MainRuntime;\n static dependencies = [LoggerAspect];\n\n static async provider(\n [loggerFactory]: [LoggerMain],\n config: GraphQLConfig,\n [moduleSlot, graphQLServerSlot, pubSubSlot]: [SchemaSlot, GraphQLServerSlot, PubSubSlot],\n context: Harmony\n ) {\n const logger = loggerFactory.createLogger(GraphqlAspect.id);\n const graphqlMain = new GraphqlMain(config, moduleSlot, context, logger, graphQLServerSlot, pubSubSlot);\n return graphqlMain;\n }\n}\n\nGraphqlAspect.addRuntime(GraphqlMain);\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,6BAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,4BAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,KAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,IAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAO,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,gBAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,eAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAU,gBAAA;EAAA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,CAA8C,EACxFH,OAAgB,EAChB;IACA,MAAMC,MAAM,GAAG+H,aAAa,CAACC,YAAY,CAACC,yBAAa,CAACP,EAAE,CAAC;IAC3D,MAAMQ,WAAW,GAAG,IAAIvI,WAAW,CAACE,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,MAAM,EAAEC,iBAAiB,EAAEC,UAAU,CAAC;IACvG,OAAOgI,WAAW;EACpB;AACF;AAACxI,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAAAnB,eAAA,CArRYmB,WAAW,WA+PP,CAACwI,eAAI,CAACC,QAAQ,CAAS,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAgB,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAa,CAAC,CAAC;AAAA5J,eAAA,CA/P1FmB,WAAW,mBAiQC;EACrBkE,IAAI,EAAE,IAAI;EACVH,sBAAsB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;EACpC1B,WAAW,EAAE,KAAK;EAClBwC,iBAAiB,EAAE;AACrB,CAAC;AAAAhG,eAAA,CAtQUmB,WAAW,aAwQL0I,kBAAW;AAAA7J,eAAA,CAxQjBmB,WAAW,kBAyQA,CAAC2I,sBAAY,CAAC;AActCL,yBAAa,CAACM,UAAU,CAAC5I,WAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_schema","data","require","_graphqlDisableIntrospection","_interopRequireDefault","_core","_cli","_harmony","_logger","_express","_expressGraphql","_toolboxNetwork","_graphql","_graphqlSubscriptions","_http","_httpProxy","_subscriptionsTransportWs","_cors","_createRemoteSchemas","_graphql2","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","Verb","exports","GraphqlMain","constructor","config","moduleSlot","context","logger","graphQLServerSlot","pubSubSlot","Map","pubsub","pubSubSlots","values","PubSub","getSchema","aspectId","get","getSchemas","aspectIds","toArray","includes","map","schema","createServer","options","graphiql","disableIntrospection","localSchema","createRootModule","schemaSlot","remoteSchemas","createRemoteSchemas","schemas","concat","x","mergeSchemas","app","express","disableCors","use","cors","origin","callback","credentials","graphqlHTTP","request","res","params","customFormatErrorFn","err","error","assign","ERR_CODE","originalError","errors","name","HTTP_CODE","code","rootValue","validationRules","NoIntrospection","undefined","server","subscriptionsPort","subscriptionsPortRange","subscriptionServerPort","getPort","port","createSubscription","proxySubscription","registerServer","register","registerPubSub","Error","listen","serverPort","subServer","info","subscriptionsPath","range","from","to","Port","websocketServer","response","writeHead","end","debug","SubscriptionServer","execute","subscribe","onConnect","onWsConnect","path","proxServer","httpProxy","createProxyServer","on","req","socket","head","url","ws","target","host","modules","buildModules","GraphQLModule","imports","schemaSlots","extensionId","moduleDeps","getModuleDependencies","module","typeDefs","resolvers","schemaDirectives","session","verb","headers","READ","set","extension","extensions","deps","getDependencies","ids","dep","id","Array","entries","depId","provider","loggerFactory","createLogger","GraphqlAspect","graphqlMain","Slot","withType","MainRuntime","LoggerAspect","addRuntime"],"sources":["graphql.main.runtime.ts"],"sourcesContent":["import { mergeSchemas } from '@graphql-tools/schema';\nimport NoIntrospection from 'graphql-disable-introspection';\nimport { GraphQLModule } from '@graphql-modules/core';\nimport { MainRuntime } from '@teambit/cli';\nimport { Harmony, Slot, SlotRegistry } from '@teambit/harmony';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport express, { Express } from 'express';\nimport { graphqlHTTP } from 'express-graphql';\nimport { Port } from '@teambit/toolbox.network.get-port';\nimport { execute, subscribe } from 'graphql';\nimport { PubSubEngine, PubSub } from 'graphql-subscriptions';\nimport { createServer, Server } from 'http';\nimport httpProxy from 'http-proxy';\nimport { SubscriptionServer } from 'subscriptions-transport-ws';\nimport cors from 'cors';\nimport { GraphQLServer } from './graphql-server';\nimport { createRemoteSchemas } from './create-remote-schemas';\nimport { GraphqlAspect } from './graphql.aspect';\nimport { Schema } from './schema';\n\nexport enum Verb {\n WRITE = 'write',\n READ = 'read',\n}\n\nexport type GraphQLConfig = {\n port: number;\n subscriptionsPortRange: number[];\n subscriptionsPath: string;\n disableCors?: boolean;\n};\n\nexport type GraphQLServerSlot = SlotRegistry<GraphQLServer>;\n\nexport type SchemaSlot = SlotRegistry<Schema>;\n\nexport type PubSubSlot = SlotRegistry<PubSubEngine>;\n\nexport type GraphQLServerOptions = {\n schemaSlot?: SchemaSlot;\n app?: Express;\n graphiql?: boolean;\n disableIntrospection?: boolean;\n remoteSchemas?: GraphQLServer[];\n subscriptionsPortRange?: number[];\n onWsConnect?: Function;\n};\n\nexport class GraphqlMain {\n constructor(\n /**\n * extension config\n */\n readonly config: GraphQLConfig,\n\n /**\n * slot for registering graphql modules\n */\n private moduleSlot: SchemaSlot,\n\n /**\n * harmony context.\n */\n private context: Harmony,\n\n /**\n * logger extension.\n */\n readonly logger: Logger,\n\n private graphQLServerSlot: GraphQLServerSlot,\n\n /**\n * graphql pubsub. allows to emit events to clients.\n */\n private pubSubSlot: PubSubSlot\n ) {}\n\n get pubsub(): PubSubEngine {\n const pubSubSlots = this.pubSubSlot.values();\n if (pubSubSlots.length) return pubSubSlots[0];\n return new PubSub();\n }\n\n private modules = new Map<string, GraphQLModule>();\n\n /**\n * returns the schema for a specific aspect by its id.\n */\n getSchema(aspectId: string) {\n return this.moduleSlot.get(aspectId);\n }\n\n /**\n * get multiple schema by aspect ids.\n */\n getSchemas(aspectIds: string[]) {\n return this.moduleSlot\n .toArray()\n .filter(([aspectId]) => {\n return aspectIds.includes(aspectId);\n })\n .map(([, schema]) => {\n return schema;\n });\n }\n\n async createServer(options: GraphQLServerOptions) {\n const { graphiql = true, disableIntrospection } = options;\n const localSchema = this.createRootModule(options.schemaSlot);\n const remoteSchemas = await createRemoteSchemas(options.remoteSchemas || this.graphQLServerSlot.values());\n const schemas = [localSchema.schema].concat(remoteSchemas).filter((x) => x);\n const schema = mergeSchemas({\n schemas,\n });\n\n // TODO: @guy please consider to refactor to express extension.\n const app = options.app || express();\n if (!this.config.disableCors) {\n app.use(\n // @ts-ignore todo: it's not clear what's the issue.\n cors({\n origin(origin, callback) {\n callback(null, true);\n },\n credentials: true,\n })\n );\n }\n\n app.use(\n '/graphql',\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n graphqlHTTP((request, res, params) => ({\n customFormatErrorFn: (err) => {\n this.logger.error('graphql got an error during running the following query:', params);\n this.logger.error('graphql error ', err);\n return Object.assign(err, {\n // @ts-ignore\n ERR_CODE: err?.originalError?.errors?.[0].ERR_CODE || err.originalError?.constructor?.name,\n // @ts-ignore\n HTTP_CODE: err?.originalError?.errors?.[0].HTTP_CODE || err.originalError?.code,\n });\n },\n schema,\n rootValue: request,\n graphiql,\n validationRules: disableIntrospection ? [NoIntrospection] : undefined,\n }))\n );\n\n const server = createServer(app);\n const subscriptionsPort = options.subscriptionsPortRange || this.config.subscriptionsPortRange;\n const subscriptionServerPort = await this.getPort(subscriptionsPort);\n const { port } = await this.createSubscription(options, subscriptionServerPort);\n this.proxySubscription(server, port);\n\n return server;\n }\n\n /**\n * register a new graphql server.\n */\n registerServer(server: GraphQLServer) {\n this.graphQLServerSlot.register(server);\n return this;\n }\n\n /**\n * register a pubsub client\n */\n registerPubSub(pubsub: PubSubEngine) {\n const pubSubSlots = this.pubSubSlot.toArray();\n if (pubSubSlots.length) throw new Error('can not register more then one pubsub provider');\n this.pubSubSlot.register(pubsub);\n return this;\n }\n\n /**\n * start a graphql server.\n */\n async listen(port?: number, server?: Server, app?: Express) {\n const serverPort = port || this.config.port;\n const subServer = server || (await this.createServer({ app }));\n\n subServer.listen(serverPort, () => {\n this.logger.info(`API Server over HTTP is now running on http://localhost:${serverPort}`);\n this.logger.info(\n `API Server over web socket with subscriptions is now running on ws://localhost:${serverPort}/${this.config.subscriptionsPath}`\n );\n });\n }\n\n /**\n * register a new graphql module.\n */\n register(schema: Schema) {\n // const module = new GraphQLModule(schema);\n this.moduleSlot.register(schema);\n return this;\n }\n\n private async getPort(range: number[]) {\n const [from, to] = range;\n return Port.getPort(from, to);\n }\n\n /** create Subscription server with different port */\n\n private async createSubscription(options: GraphQLServerOptions, port: number) {\n // Create WebSocket listener server\n const websocketServer = createServer((request, response) => {\n response.writeHead(404);\n response.end();\n });\n\n // Bind it to port and start listening\n websocketServer.listen(port, () =>\n this.logger.debug(`Websocket Server is now running on http://localhost:${port}`)\n );\n\n const localSchema = this.createRootModule(options.schemaSlot);\n const remoteSchemas = await createRemoteSchemas(options.remoteSchemas || this.graphQLServerSlot.values());\n const schemas = [localSchema.schema].concat(remoteSchemas).filter((x) => x);\n const schema = mergeSchemas({\n schemas,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const subServer = new SubscriptionServer(\n {\n execute,\n subscribe,\n schema,\n onConnect: options.onWsConnect,\n },\n {\n server: websocketServer,\n path: this.config.subscriptionsPath,\n }\n );\n return { subServer, port };\n }\n /** proxy ws Subscription server to avoid conflict with different websocket connections */\n\n private proxySubscription(server: Server, port: number) {\n const proxServer = httpProxy.createProxyServer();\n const subscriptionsPath = this.config.subscriptionsPath;\n server.on('upgrade', function (req, socket, head) {\n if (req.url === subscriptionsPath) {\n proxServer.ws(req, socket, head, { target: { host: 'localhost', port } });\n }\n });\n }\n\n private createRootModule(schemaSlot?: SchemaSlot) {\n const modules = this.buildModules(schemaSlot);\n\n return new GraphQLModule({\n imports: modules,\n });\n }\n\n private buildModules(schemaSlot?: SchemaSlot) {\n const schemaSlots = schemaSlot ? schemaSlot.toArray() : this.moduleSlot.toArray();\n return schemaSlots.map(([extensionId, schema]) => {\n const moduleDeps = this.getModuleDependencies(extensionId);\n\n const module = new GraphQLModule({\n typeDefs: schema.typeDefs,\n resolvers: schema.resolvers,\n schemaDirectives: schema.schemaDirectives,\n imports: moduleDeps,\n context: (session) => {\n return {\n ...session,\n verb: session?.headers?.['x-verb'] || Verb.READ,\n };\n },\n });\n\n this.modules.set(extensionId, module);\n\n return module;\n });\n }\n\n private getModuleDependencies(extensionId: string): GraphQLModule[] {\n const extension = this.context.extensions.get(extensionId);\n if (!extension) throw new Error(`aspect ${extensionId} was not found`);\n const deps = this.context.getDependencies(extension);\n const ids = deps.map((dep) => dep.id);\n\n // @ts-ignore check :TODO why types are breaking here.\n return Array.from(this.modules.entries())\n .map(([depId, module]) => {\n const dep = ids.includes(depId);\n if (!dep) return undefined;\n return module;\n })\n .filter((module) => !!module);\n }\n\n static slots = [Slot.withType<Schema>(), Slot.withType<GraphQLServer>(), Slot.withType<PubSubSlot>()];\n\n static defaultConfig = {\n port: 4000,\n subscriptionsPortRange: [2000, 2100],\n disableCors: false,\n subscriptionsPath: '/subscriptions',\n };\n\n static runtime = MainRuntime;\n static dependencies = [LoggerAspect];\n\n static async provider(\n [loggerFactory]: [LoggerMain],\n config: GraphQLConfig,\n [moduleSlot, graphQLServerSlot, pubSubSlot]: [SchemaSlot, GraphQLServerSlot, PubSubSlot],\n context: Harmony\n ) {\n const logger = loggerFactory.createLogger(GraphqlAspect.id);\n const graphqlMain = new GraphqlMain(config, moduleSlot, context, logger, graphQLServerSlot, pubSubSlot);\n return graphqlMain;\n }\n}\n\nGraphqlAspect.addRuntime(GraphqlMain);\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,6BAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,4BAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,K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ACpC1B,WAAW,EAAE,KAAK;EAClBwC,iBAAiB,EAAE;AACrB,CAAC;AAAA/F,eAAA,CAtQUkB,WAAW,aAwQL0I,kBAAW;AAAA5J,eAAA,CAxQjBkB,WAAW,kBAyQA,CAAC2I,sBAAY,CAAC;AActCL,yBAAa,CAACM,UAAU,CAAC5I,WAAW,CAAC","ignoreList":[]}
@@ -81,8 +81,8 @@ function _logging() {
81
81
  };
82
82
  return data;
83
83
  }
84
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
85
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
84
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
85
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
86
86
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
87
87
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
88
88
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_client","_ws","_error","_crossFetch","_createLink","_graphqlProvider","_graphql","_renderLifecycle","_logging","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","GraphqlUI","constructor","client","children","createElement","GraphQLProvider","GraphqlRenderPlugins","createClient","uri","state","subscriptionUri","ApolloClient","link","createLink","cache","createCache","createSsrClient","serverUrl","headers","ApolloLink","from","onError","logError","createHttpLink","credentials","fetch","crossFetch","ssrMode","InMemoryCache","restore","httpLink","HttpLink","subsLink","WebSocketLink","options","reconnect","undefined","hybridLink","createSplitLink","errorLogger","provider","graphqlUI","exports","UIRuntime","GraphqlAspect","addRuntime"],"sources":["graphql.ui.runtime.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { UIRuntime } from '@teambit/ui';\n\nimport { InMemoryCache, ApolloClient, ApolloLink, HttpLink, createHttpLink } from '@apollo/client';\nimport type { NormalizedCacheObject } from '@apollo/client';\nimport { WebSocketLink } from '@apollo/client/link/ws';\nimport { onError } from '@apollo/client/link/error';\n\nimport crossFetch from 'cross-fetch';\n\nimport { createSplitLink } from './create-link';\nimport { GraphQLProvider } from './graphql-provider';\nimport { GraphqlAspect } from './graphql.aspect';\nimport { GraphqlRenderPlugins } from './render-lifecycle';\nimport { logError } from './logging';\n\n/**\n * Type of gql client.\n * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly\n * */\nexport type GraphQLClient<T> = ApolloClient<T>;\n\ntype ClientOptions = {\n /** Preset in-memory cache with state (e.g. continue state from SSR) */\n state?: NormalizedCacheObject;\n /** endpoint for websocket connections */\n subscriptionUri?: string;\n};\n\nexport class GraphqlUI {\n createClient(uri: string, { state, subscriptionUri }: ClientOptions = {}) {\n const client = new ApolloClient({\n link: this.createLink(uri, { subscriptionUri }),\n cache: this.createCache({ state }),\n });\n\n return client;\n }\n\n createSsrClient({ serverUrl, headers }: { serverUrl: string; headers: any }) {\n const link = ApolloLink.from([\n onError(logError),\n createHttpLink({\n credentials: 'include',\n uri: serverUrl,\n headers,\n fetch: crossFetch,\n }),\n ]);\n\n const client = new ApolloClient({\n ssrMode: true,\n link,\n cache: this.createCache(),\n });\n\n return client;\n }\n\n private createCache({ state }: { state?: NormalizedCacheObject } = {}) {\n const cache = new InMemoryCache();\n\n if (state) cache.restore(state);\n\n return cache;\n }\n\n private createLink(uri: string, { subscriptionUri }: { subscriptionUri?: string } = {}) {\n const httpLink = new HttpLink({ credentials: 'include', uri });\n const subsLink = subscriptionUri\n ? new WebSocketLink({\n uri: subscriptionUri,\n options: { reconnect: true },\n })\n : undefined;\n\n const hybridLink = subsLink ? createSplitLink(httpLink, subsLink) : httpLink;\n const errorLogger = onError(logError);\n\n return ApolloLink.from([errorLogger, hybridLink]);\n }\n\n /**\n * get the graphQL provider\n */\n getProvider = ({ client, children }: { client: GraphQLClient<any>; children: ReactNode }) => {\n return <GraphQLProvider client={client}>{children}</GraphQLProvider>;\n };\n\n readonly renderPlugins = new GraphqlRenderPlugins(this);\n\n static runtime = UIRuntime;\n static dependencies = [];\n static slots = [];\n\n static async provider() {\n const graphqlUI = new GraphqlUI();\n\n return graphqlUI;\n }\n}\n\nGraphqlAspect.addRuntime(GraphqlUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,IAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,GAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,WAAA,YAA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,SAAS,kBA+DE,EAAE;AAAApB,eAAA,CA/DboB,SAAS,WAgEL,EAAE;AASnB4C,wBAAa,CAACC,UAAU,CAAC7C,SAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_client","_ws","_error","_crossFetch","_createLink","_graphqlProvider","_graphql","_renderLifecycle","_logging","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","GraphqlUI","constructor","client","children","createElement","GraphQLProvider","GraphqlRenderPlugins","createClient","uri","state","subscriptionUri","ApolloClient","link","createLink","cache","createCache","createSsrClient","serverUrl","headers","ApolloLink","from","onError","logError","createHttpLink","credentials","fetch","crossFetch","ssrMode","InMemoryCache","restore","httpLink","HttpLink","subsLink","WebSocketLink","options","reconnect","undefined","hybridLink","createSplitLink","errorLogger","provider","graphqlUI","exports","UIRuntime","GraphqlAspect","addRuntime"],"sources":["graphql.ui.runtime.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { UIRuntime } from '@teambit/ui';\n\nimport { InMemoryCache, ApolloClient, ApolloLink, HttpLink, createHttpLink } from '@apollo/client';\nimport type { NormalizedCacheObject } from '@apollo/client';\nimport { WebSocketLink } from '@apollo/client/link/ws';\nimport { onError } from '@apollo/client/link/error';\n\nimport crossFetch from 'cross-fetch';\n\nimport { createSplitLink } from './create-link';\nimport { GraphQLProvider } from './graphql-provider';\nimport { GraphqlAspect } from './graphql.aspect';\nimport { GraphqlRenderPlugins } from './render-lifecycle';\nimport { logError } from './logging';\n\n/**\n * Type of gql client.\n * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly\n * */\nexport type GraphQLClient<T> = ApolloClient<T>;\n\ntype ClientOptions = {\n /** Preset in-memory cache with state (e.g. continue state from SSR) */\n state?: NormalizedCacheObject;\n /** endpoint for websocket connections */\n subscriptionUri?: string;\n};\n\nexport class GraphqlUI {\n createClient(uri: string, { state, subscriptionUri }: ClientOptions = {}) {\n const client = new ApolloClient({\n link: this.createLink(uri, { subscriptionUri }),\n cache: this.createCache({ state }),\n });\n\n return client;\n }\n\n createSsrClient({ serverUrl, headers }: { serverUrl: string; headers: any }) {\n const link = ApolloLink.from([\n onError(logError),\n createHttpLink({\n credentials: 'include',\n uri: serverUrl,\n headers,\n fetch: crossFetch,\n }),\n ]);\n\n const client = new ApolloClient({\n ssrMode: true,\n link,\n cache: this.createCache(),\n });\n\n return client;\n }\n\n private createCache({ state }: { state?: NormalizedCacheObject } = {}) {\n const cache = new InMemoryCache();\n\n if (state) cache.restore(state);\n\n return cache;\n }\n\n private createLink(uri: string, { subscriptionUri }: { subscriptionUri?: string } = {}) {\n const httpLink = new HttpLink({ credentials: 'include', uri });\n const subsLink = subscriptionUri\n ? new WebSocketLink({\n uri: subscriptionUri,\n options: { reconnect: true },\n })\n : undefined;\n\n const hybridLink = subsLink ? createSplitLink(httpLink, subsLink) : httpLink;\n const errorLogger = onError(logError);\n\n return ApolloLink.from([errorLogger, hybridLink]);\n }\n\n /**\n * get the graphQL provider\n */\n getProvider = ({ client, children }: { client: GraphQLClient<any>; children: ReactNode }) => {\n return <GraphQLProvider client={client}>{children}</GraphQLProvider>;\n };\n\n readonly renderPlugins = new GraphqlRenderPlugins(this);\n\n static runtime = UIRuntime;\n static dependencies = [];\n static slots = [];\n\n static async provider() {\n const graphqlUI = new GraphqlUI();\n\n return graphqlUI;\n }\n}\n\nGraphqlAspect.addRuntime(GraphqlUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA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SAAS;IAEb,MAAMC,UAAU,GAAGL,QAAQ,GAAG,IAAAM,6BAAe,EAACR,QAAQ,EAAEE,QAAQ,CAAC,GAAGF,QAAQ;IAC5E,MAAMS,WAAW,GAAG,IAAAlB,gBAAO,EAACC,mBAAQ,CAAC;IAErC,OAAOH,oBAAU,CAACC,IAAI,CAAC,CAACmB,WAAW,EAAEF,UAAU,CAAC,CAAC;EACnD;EAeA,aAAaG,QAAQA,CAAA,EAAG;IACtB,MAAMC,SAAS,GAAG,IAAIzC,SAAS,CAAC,CAAC;IAEjC,OAAOyC,SAAS;EAClB;AACF;AAACC,OAAA,CAAA1C,SAAA,GAAAA,SAAA;AAAAlB,eAAA,CAvEYkB,SAAS,aA8DH2C,eAAS;AAAA7D,eAAA,CA9DfkB,SAAS,kBA+DE,EAAE;AAAAlB,eAAA,CA/DbkB,SAAS,WAgEL,EAAE;AASnB4C,wBAAa,CAACC,UAAU,CAAC7C,SAAS,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["logError","graphQLErrors","networkError","operation","forEach","message","locations","path","console","error","operationName"],"sources":["logging.ts"],"sourcesContent":["import { ErrorResponse } from '@apollo/client/link/error';\n\nexport function logError({ graphQLErrors, networkError, operation }: ErrorResponse) {\n if (graphQLErrors)\n graphQLErrors.forEach(({ message, locations, path }) =>\n // eslint-disable-next-line no-console\n console.error(`[gql] error on \"${operation.operationName}\" - \"${message}\"`, locations, path)\n );\n\n // eslint-disable-next-line no-console\n if (networkError) console.error('[gql] network error', `\"${operation.operationName}\"`, networkError);\n}\n\n// // // a fetch monkey patch with logs. useful to debug gql\n// function loggingCrossFetch(...p: Parameters<typeof fetch>) {\n// const [url, init] = p;\n// const headers = init?.headers;\n// const body = init?.body;\n\n// console.debug('[gql]', 'fetching', url, body, { headers });\n// const promise = crossFetch(...p);\n// promise\n// .then((result) => console.debug('[gql]', 'finished', result))\n// .catch((err) => console.debug('[gql]', 'error', err));\n// return promise;\n// }\n"],"mappings":";;;;;;AAEO,SAASA,QAAQA,CAAC;EAAEC,aAAa;EAAEC,YAAY;EAAEC;AAAyB,CAAC,EAAE;EAClF,IAAIF,aAAa,EACfA,aAAa,CAACG,OAAO,CAAC,CAAC;IAAEC,OAAO;IAAEC,SAAS;IAAEC;EAAK,CAAC;EACjD;EACAC,OAAO,CAACC,KAAK,CAAE,mBAAkBN,SAAS,CAACO,aAAc,QAAOL,OAAQ,GAAE,EAAEC,SAAS,EAAEC,IAAI,CAC7F,CAAC;;EAEH;EACA,IAAIL,YAAY,EAAEM,OAAO,CAACC,KAAK,CAAC,qBAAqB,EAAG,IAAGN,SAAS,CAACO,aAAc,GAAE,EAAER,YAAY,CAAC;AACtG;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["logError","graphQLErrors","networkError","operation","forEach","message","locations","path","console","error","operationName"],"sources":["logging.ts"],"sourcesContent":["import { ErrorResponse } from '@apollo/client/link/error';\n\nexport function logError({ graphQLErrors, networkError, operation }: ErrorResponse) {\n if (graphQLErrors)\n graphQLErrors.forEach(({ message, locations, path }) =>\n // eslint-disable-next-line no-console\n console.error(`[gql] error on \"${operation.operationName}\" - \"${message}\"`, locations, path)\n );\n\n // eslint-disable-next-line no-console\n if (networkError) console.error('[gql] network error', `\"${operation.operationName}\"`, networkError);\n}\n\n// // // a fetch monkey patch with logs. useful to debug gql\n// function loggingCrossFetch(...p: Parameters<typeof fetch>) {\n// const [url, init] = p;\n// const headers = init?.headers;\n// const body = init?.body;\n\n// console.debug('[gql]', 'fetching', url, body, { headers });\n// const promise = crossFetch(...p);\n// promise\n// .then((result) => console.debug('[gql]', 'finished', result))\n// .catch((err) => console.debug('[gql]', 'error', err));\n// return promise;\n// }\n"],"mappings":";;;;;;AAEO,SAASA,QAAQA,CAAC;EAAEC,aAAa;EAAEC,YAAY;EAAEC;AAAyB,CAAC,EAAE;EAClF,IAAIF,aAAa,EACfA,aAAa,CAACG,OAAO,CAAC,CAAC;IAAEC,OAAO;IAAEC,SAAS;IAAEC;EAAK,CAAC;EACjD;EACAC,OAAO,CAACC,KAAK,CAAC,mBAAmBN,SAAS,CAACO,aAAa,QAAQL,OAAO,GAAG,EAAEC,SAAS,EAAEC,IAAI,CAC7F,CAAC;;EAEH;EACA,IAAIL,YAAY,EAAEM,OAAO,CAACC,KAAK,CAAC,qBAAqB,EAAE,IAAIN,SAAS,CAACO,aAAa,GAAG,EAAER,YAAY,CAAC;AACtG;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_graphql@1.0.281/dist/graphql.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_graphql@1.0.281/dist/graphql.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_graphql@1.0.283/dist/graphql.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_graphql@1.0.283/dist/graphql.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -53,8 +53,8 @@ function _graphql() {
53
53
  };
54
54
  return data;
55
55
  }
56
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
57
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
56
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
57
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
58
58
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
59
59
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // Calling getMarkupFromTree instead of getDataFromTree so we can control the render function
60
60
  // This is required since upgrade to @apollo/client v3.6.9 because otherwise the ssr is not working since
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_ssr","_server","_lodash","_uiFoundationUi","_graphqlProvider","_graphql","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ALLOWED_HEADERS","GraphqlRenderPlugins","constructor","graphqlUI","GraphqlAspect","id","browser","port","location","serverUrl","client","createSsrClient","headers","pick","ctx","app","getMarkupFromTree","tree","renderFunction","ReactDOMServer","renderToStaticMarkup","undefined","json","JSON","stringify","extract","raw","state","parse","console","error","window","isInsecure","protocol","wsUrl","host","createClient","subscriptionUri","_client","renderCtx","children","createElement","getProvider","isBrowser","BrowserGqlProvider","ServerGqlProvider","getClient","browserInit","exports","GraphQLProvider"],"sources":["render-lifecycle.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\n// Calling getMarkupFromTree instead of getDataFromTree so we can control the render function\n// This is required since upgrade to @apollo/client v3.6.9 because otherwise the ssr is not working since\n// webpack is not bundling the react-dom/server\nimport { getMarkupFromTree } from '@apollo/client/react/ssr';\nimport ReactDOMServer from 'react-dom/server';\nimport type { ApolloClient, NormalizedCacheObject } from '@apollo/client';\nimport pick from 'lodash.pick';\n\nimport { isBrowser } from '@teambit/ui-foundation.ui.is-browser';\nimport type { SSR } from '@teambit/ui';\n\nimport type { GraphqlUI, GraphQLClient } from './graphql.ui.runtime';\nimport { GraphQLProvider } from './graphql-provider';\nimport { GraphqlAspect } from './graphql.aspect';\n\ntype RenderContext = {\n client: GraphQLClient<any>;\n};\n\nconst ALLOWED_HEADERS = ['cookie'];\n\nexport class GraphqlRenderPlugins implements SSR.RenderPlugin<RenderContext, { state?: NormalizedCacheObject }> {\n constructor(private graphqlUI: GraphqlUI) {}\n\n key = GraphqlAspect.id;\n\n serverInit = ({ browser }: SSR.SsrSession) => {\n const port = browser?.location.port || 3000;\n const serverUrl = `http://localhost:${port}/graphql`;\n\n const client = this.graphqlUI.createSsrClient({\n serverUrl,\n headers: pick(browser?.headers, ALLOWED_HEADERS),\n });\n\n const ctx: RenderContext = { client };\n return ctx;\n };\n\n /**\n * Eagerly and recursively execute all gql queries in the app.\n * Data will be available in gqlClient.extract()\n */\n onBeforeRender = async (ctx: RenderContext, app: ReactNode) => {\n await getMarkupFromTree({ tree: app, renderFunction: ReactDOMServer.renderToStaticMarkup });\n };\n\n serialize = (ctx?: RenderContext) => {\n const client = ctx?.client;\n if (!client) return undefined;\n\n return {\n json: JSON.stringify(client.extract()),\n };\n };\n\n deserialize = (raw?: string) => {\n if (!raw) return { state: undefined };\n let state: NormalizedCacheObject | undefined;\n try {\n state = JSON.parse(raw);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('[GraphQL] failed deserializing state from DOM', e);\n }\n\n return { state };\n };\n\n private _client: ApolloClient<NormalizedCacheObject> | undefined = undefined;\n\n browserInit = ({ state }: { state?: NormalizedCacheObject } = {}) => {\n const { location } = window;\n const isInsecure = location.protocol === 'http:';\n const wsUrl = `${isInsecure ? 'ws:' : 'wss:'}//${location.host}/subscriptions`;\n\n const client = this.graphqlUI.createClient('/graphql', { state, subscriptionUri: wsUrl });\n this._client = client;\n\n return { client };\n };\n\n getClient() {\n if (!this._client) return this.browserInit().client;\n return this._client;\n }\n\n private BrowserGqlProvider = ({ renderCtx, children }: { renderCtx?: RenderContext; children: ReactNode }) => {\n if (!renderCtx?.client) throw new TypeError('GQL client is not initialized, make sure `.browserInit()` executes');\n\n return <this.graphqlUI.getProvider client={renderCtx?.client}>{children}</this.graphqlUI.getProvider>;\n };\n\n reactContext = isBrowser ? this.BrowserGqlProvider : ServerGqlProvider;\n}\n\nfunction ServerGqlProvider({ renderCtx, children }: { renderCtx?: RenderContext; children: ReactNode }) {\n if (!renderCtx?.client)\n throw new TypeError('GQL client has not been initialized during SSR, make sure `.serverInit()` executes');\n\n const { client } = renderCtx;\n return <GraphQLProvider client={client}>{children}</GraphQLProvider>;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,gBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAO,iBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,gBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OA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CAAC;AACtE","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_ssr","_server","_lodash","_uiFoundationUi","_graphqlProvider","_graphql","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ALLOWED_HEADERS","GraphqlRenderPlugins","constructor","graphqlUI","GraphqlAspect","id","browser","port","location","serverUrl","client","createSsrClient","headers","pick","ctx","app","getMarkupFromTree","tree","renderFunction","ReactDOMServer","renderToStaticMarkup","undefined","json","JSON","stringify","extract","raw","state","parse","console","error","window","isInsecure","protocol","wsUrl","host","createClient","subscriptionUri","_client","renderCtx","children","createElement","getProvider","isBrowser","BrowserGqlProvider","ServerGqlProvider","getClient","browserInit","exports","GraphQLProvider"],"sources":["render-lifecycle.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\n// Calling getMarkupFromTree instead of getDataFromTree so we can control the render function\n// This is required since upgrade to @apollo/client v3.6.9 because otherwise the ssr is not working since\n// webpack is not bundling the react-dom/server\nimport { getMarkupFromTree } from '@apollo/client/react/ssr';\nimport ReactDOMServer from 'react-dom/server';\nimport type { ApolloClient, NormalizedCacheObject } from '@apollo/client';\nimport pick from 'lodash.pick';\n\nimport { isBrowser } from '@teambit/ui-foundation.ui.is-browser';\nimport type { SSR } from '@teambit/ui';\n\nimport type { GraphqlUI, GraphQLClient } from './graphql.ui.runtime';\nimport { GraphQLProvider } from './graphql-provider';\nimport { GraphqlAspect } from './graphql.aspect';\n\ntype RenderContext = {\n client: GraphQLClient<any>;\n};\n\nconst ALLOWED_HEADERS = ['cookie'];\n\nexport class GraphqlRenderPlugins implements SSR.RenderPlugin<RenderContext, { state?: NormalizedCacheObject }> {\n constructor(private graphqlUI: GraphqlUI) {}\n\n key = GraphqlAspect.id;\n\n serverInit = ({ browser }: SSR.SsrSession) => {\n const port = browser?.location.port || 3000;\n const serverUrl = `http://localhost:${port}/graphql`;\n\n const client = this.graphqlUI.createSsrClient({\n serverUrl,\n headers: pick(browser?.headers, ALLOWED_HEADERS),\n });\n\n const ctx: RenderContext = { client };\n return ctx;\n };\n\n /**\n * Eagerly and recursively execute all gql queries in the app.\n * Data will be available in gqlClient.extract()\n */\n onBeforeRender = async (ctx: RenderContext, app: ReactNode) => {\n await getMarkupFromTree({ tree: app, renderFunction: ReactDOMServer.renderToStaticMarkup });\n };\n\n serialize = (ctx?: RenderContext) => {\n const client = ctx?.client;\n if (!client) return undefined;\n\n return {\n json: JSON.stringify(client.extract()),\n };\n };\n\n deserialize = (raw?: string) => {\n if (!raw) return { state: undefined };\n let state: NormalizedCacheObject | undefined;\n try {\n state = JSON.parse(raw);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('[GraphQL] failed deserializing state from DOM', e);\n }\n\n return { state };\n };\n\n private _client: ApolloClient<NormalizedCacheObject> | undefined = undefined;\n\n browserInit = ({ state }: { state?: NormalizedCacheObject } = {}) => {\n const { location } = window;\n const isInsecure = location.protocol === 'http:';\n const wsUrl = `${isInsecure ? 'ws:' : 'wss:'}//${location.host}/subscriptions`;\n\n const client = this.graphqlUI.createClient('/graphql', { state, subscriptionUri: wsUrl });\n this._client = client;\n\n return { client };\n };\n\n getClient() {\n if (!this._client) return this.browserInit().client;\n return this._client;\n }\n\n private BrowserGqlProvider = ({ renderCtx, children }: { renderCtx?: RenderContext; children: ReactNode }) => {\n if (!renderCtx?.client) throw new TypeError('GQL client is not initialized, make sure `.browserInit()` executes');\n\n return <this.graphqlUI.getProvider client={renderCtx?.client}>{children}</this.graphqlUI.getProvider>;\n };\n\n reactContext = isBrowser ? this.BrowserGqlProvider : ServerGqlProvider;\n}\n\nfunction ServerGqlProvider({ renderCtx, children }: { renderCtx?: RenderContext; children: ReactNode }) {\n if (!renderCtx?.client)\n throw new TypeError('GQL client has not been initialized during SSR, make sure `.serverInit()` executes');\n\n const { client } = renderCtx;\n return <GraphQLProvider client={client}>{children}</GraphQLProvider>;\n}\n"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EA;MAAO,CAAC;IACnB,CAAC;IAAA5B,eAAA,6BAO4B,CAAC;MAAEyD,SAAS;MAAEC;IAA6D,CAAC,KAAK;MAC5G,IAAI,CAACD,SAAS,EAAE7B,MAAM,EAAE,MAAM,IAAIb,SAAS,CAAC,oEAAoE,CAAC;MAEjH,oBAAO5B,MAAA,GAAAY,OAAA,CAAA4D,aAAA,MAAMtC,SAAS,CAACuC,WAAW;QAAChC,MAAM,EAAE6B,SAAS,EAAE7B;MAAO,GAAE8B,QAAqC,CAAC;IACvG,CAAC;IAAA1D,eAAA,uBAEc6D,2BAAS,GAAG,IAAI,CAACC,kBAAkB,GAAGC,iBAAiB;EAvE3B;EA4D3CC,SAASA,CAAA,EAAG;IACV,IAAI,CAAC,IAAI,CAACR,OAAO,EAAE,OAAO,IAAI,CAACS,WAAW,CAAC,CAAC,CAACrC,MAAM;IACnD,OAAO,IAAI,CAAC4B,OAAO;EACrB;AASF;AAACU,OAAA,CAAA/C,oBAAA,GAAAA,oBAAA;AAED,SAAS4C,iBAAiBA,CAAC;EAAEN,SAAS;EAAEC;AAA6D,CAAC,EAAE;EACtG,IAAI,CAACD,SAAS,EAAE7B,MAAM,EACpB,MAAM,IAAIb,SAAS,CAAC,oFAAoF,CAAC;EAE3G,MAAM;IAAEa;EAAO,CAAC,GAAG6B,SAAS;EAC5B,oBAAOtE,MAAA,GAAAY,OAAA,CAAA4D,aAAA,CAAChE,gBAAA,GAAAwE,eAAe;IAACvC,MAAM,EAAEA;EAAO,GAAE8B,QAA0B,CAAC;AACtE","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/graphql",
3
- "version": "1.0.281",
3
+ "version": "1.0.283",
4
4
  "homepage": "https://bit.cloud/teambit/harmony/graphql",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "graphql",
9
- "version": "1.0.281"
9
+ "version": "1.0.283"
10
10
  },
11
11
  "dependencies": {
12
12
  "@graphql-modules/core": "0.7.17",
@@ -35,7 +35,7 @@
35
35
  "@teambit/cli": "0.0.865",
36
36
  "@teambit/logger": "0.0.958",
37
37
  "@teambit/toolbox.network.get-port": "1.0.6",
38
- "@teambit/ui": "1.0.281"
38
+ "@teambit/ui": "1.0.283"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/cors": "2.8.10",