Skip to content

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

@madis

Description

@madis

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions