Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated dependencies and manual config when working with shadow-cljs #15

Open
madis opened this issue Mar 16, 2021 · 0 comments
Open

Comments

@madis
Copy link
Member

madis commented Mar 16, 2021

Currently there's some manual effort needed to get this library working with shadow-cljs. Worth considering incorporating some of this into the codebase:

Writing it down so that I don't forget and that me or someone else could use it as basis for changes.

Missing nodejs dependencies & externs

The following currently have to be added to package.json

"apollo-fetch": "^0.7.0",
"dataloader": "^1.4.0",
"graphql": "^15.5.0",
"process": "^0.11.10",

And three files have to be created (and incorporated into the build) to make the objects these libraries expose, available:

  1. src/cljsjs/apollo_fetch.cljs:
(ns cljsjs.apollo-fetch
  (:require ["apollo-fetch" :as af]))

(js/goog.exportSymbol "apolloFetch" af)
  1. src/cljsjs/dataloader.cljs
(ns cljsjs.dataloader
  (:require ["dataloader" :as dl]))

(js/goog.exportSymbol "DataLoader" dl)
  1. src/cljsjs/graphql.cljs
(ns cljsjs.graphql
  (:require ["graphql" :as gql]))

(js/goog.exportSymbol "GraphQL" gql)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant