demo-graphql-js-hello-world

Demo GraphQL.js hello world: demonstrate Facebook GraphQL.js, Node, NPM, Babel, etc.

https://github.com/joelparkerhenderson/demo-graphql-js-hello-world

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Demo GraphQL.js hello world: demonstrate Facebook GraphQL.js, Node, NPM, Babel, etc.

Basic Info
  • Host: GitHub
  • Owner: joelparkerhenderson
  • Language: JavaScript
  • Default Branch: master
  • Size: 15.6 KB
Statistics
  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 8 years ago · Last pushed about 1 year ago
Metadata Files
Readme Citation

README.md

Demo GraphQL.js hello world

Demonsrate:

  • GraphQL.js that prints "hello world".
  • Babel: The compiler for next generation JavaScript
  • npm: Node package manager

Init

sh $ npm init

demo.js

Create a file such as demo.js (see the file in this repo).

The demo file will do two things:

  • Build a GraphQL type schema which maps to your code base.

  • Serve the result of a query against that type schema.

Babel

As of this writing, Node.js doesn't support ES6 imports yet. However, you can use them today with the help of Babel.

sh $ npm install babel-register babel-preset-env --save-dev

Create a file such as start.js (see the file in this repo).

The file does two things:

  • Transpile all code with babel and using 'env' preset.

  • Import the rest of our application.

Babel solves this error message:

sh (function (exports, require, module, __filename, __dirname) { import { SyntaxError: Unexpected token

Run

Run the app:

sh $ node start.js { data: { hello: 'world' } }

Owner

  • Name: Joel Parker Henderson
  • Login: joelparkerhenderson
  • Kind: user
  • Location: California

Software developer. Technology consultant. Creator of GitAlias.com, NumCommand.com, SixArm.com, and many open source projects.

Citation (CITATION.cff)

cff-version: 1.2.0
title: Demo GraphQL.js hello world
message: >-
  If you use this work and you want to cite it,
  then you can use the metadata from this file.
type: software
authors:
  - given-names: Joel Parker
    family-names: Henderson
    email: joel@joelparkerhenderson.com
    affiliation: joelparkerhenderson.com
    orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
  - type: url
    value: 'https://github.com/joelparkerhenderson/demo-graphql-js-hello-world/'
    description: Demo GraphQL.js hello world
repository-code: 'https://github.com/joelparkerhenderson/demo-graphql-js-hello-world/'
abstract: >-
  Demo GraphQL.js hello world
license: See license file

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 4
  • Total Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joel Parker Henderson j****l@j****m 4
Committer Domains (Top 20 + Academic)

Dependencies

package-lock.json npm
  • 213 dependencies
package.json npm
  • babel-cli ^6.26.0 development
  • babel-preset-env ^1.7.0 development
  • babel-register ^6.26.0 development
  • babel ^6.23.0
  • graphql ^0.13.2