Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import * as QueryHandler from "./src/api/QueryHandler";
- QueryHandler.
- class QueryHandler{
- constructor();
- createConnection() {
- const client = new ApolloClient({
- // uri: url
- });
- }
- }
- exports.QueryHandler = QueryHandler;
- const handler = new QueryHandler();
- handler.createConnection()
- // QueryHandler.js
- class QueryHandler{
- static createConnection() {
- const client = new ApolloClient({
- // uri: url
- });
- }
- }
- export default QueryHandler;
- // index.js
- import QueryHandler from "./src/api/QueryHandler";
- QueryHandler.createConnection()
- // QueryHandler.js
- function createConnection() {
- const client = new ApolloClient({
- // uri: url
- });
- }
- export { createConnection };
- // index.js
- import { createConnection } from "./src/api/QueryHandler";
- createConnection()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement