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

install from CDN? #1639

Closed
guykatz opened this issue Jan 1, 2019 · 3 comments
Closed

install from CDN? #1639

guykatz opened this issue Jan 1, 2019 · 3 comments
Labels

Comments

@guykatz
Copy link

guykatz commented Jan 1, 2019

hi all;
I do not use NPM/WEBPACK etc. I have 2 questions:

  1. can I 'install' this library from CDN
  2. can I use ES5 only with this library? (not ES6 transpiled to 5 but actual 5 from the start)
    thanks
@rafalp
Copy link

rafalp commented Jan 1, 2019

This is GraphQL Server implementation

NPM and WebPack are two different things:

  • NPM is package manager that is used to install dependencies. It's good thing and you should use it. Some argue that Yarn is superior package manager, but I believe both are supported.
  • WebPack is a bundler. It takes number of source files and bundles them into much smaller number of files by following in-file imports like require()s or include. This is done to make application work in browsers, which don't handle JS modules too well.

GraphQL.js you are seeing here is library for writing GraphQL servers. It should run on the server with node.js using express or such. Many people opt-in to use Apollo-Server which packs GraphQL up in single easy to use package that enables developer to start working on their GraphQL API quickly.

@IvanGoncharov
Copy link
Member

@rafalp Thanks for detail answer 👍

can I 'install' this library from CDN

@guykatz We distribute GraphQL as CJS/MJS package on NPM.
This library is huge (ATM. ~700kb and growing with each release) but highly modular so we expect that frontend apps will use only necessary parts. That's why we don't release it as a single file bundle and expect developers to use it together with bundlers.

can I use ES5 only with this library? (not ES6 transpiled to 5 but actual 5 from the start)

Yes, we publishing only ES5 code on NPM

@networkimprov
Copy link

Sorry for posting to an old issue, but in case it helps anyone...
The NPM module appears to be available here, size 161Kb:
https://www.jsdelivr.com/package/npm/graphql

The file starts:
Bundled by jsDelivr using Rollup v2.74.1 and Terser v5.15.1.
Original file: /npm/graphql@16.6.0/index.mjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants