Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. import * as QueryHandler from "./src/api/QueryHandler";
  2. QueryHandler.
  3.  
  4. class QueryHandler{
  5. constructor();
  6.  
  7. createConnection() {
  8. const client = new ApolloClient({
  9. // uri: url
  10. });
  11. }
  12. }
  13. exports.QueryHandler = QueryHandler;
  14.  
  15. const handler = new QueryHandler();
  16. handler.createConnection()
  17.  
  18. // QueryHandler.js
  19. class QueryHandler{
  20. static createConnection() {
  21. const client = new ApolloClient({
  22. // uri: url
  23. });
  24. }
  25. }
  26.  
  27. export default QueryHandler;
  28.  
  29. // index.js
  30. import QueryHandler from "./src/api/QueryHandler";
  31. QueryHandler.createConnection()
  32.  
  33. // QueryHandler.js
  34. function createConnection() {
  35. const client = new ApolloClient({
  36. // uri: url
  37. });
  38. }
  39.  
  40. export { createConnection };
  41.  
  42. // index.js
  43. import { createConnection } from "./src/api/QueryHandler";
  44. createConnection()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement