@focus-reactive/graphql-content-layer

3.2.5 • Public • Published

npm version

GitNation GraphQL Content Layer

package for fetching conference content from GraphCMS

it's published on NPM as

@focus-reactive/graphql-content-layer

This package is intended for:

  1. Fetching data from GraphCMS, process and building content layer
  2. Generate Storybook with output of:
    1. GraphCMS queries (CMS Layer)
    2. Processed content (Content Layer)

API and Configuring

  1. GraphCMS connection should be configured via env variables: CMS_ENDPOINT and CMS_TOKEN

  2. The package exposes getContent async function for generating content layer

Usage:

const { getContent } = require('@focus-reactive/graphql-content-layer');

const content = await getContent(conferenceSettings);

see conferenceSettings for details

  1. The package generates Storybook with CMS and Content layers

to use it:

// story.js

const {
  passConferenceSettings,
} = require('@focus-reactive/graphql-content-layer/dist/content.stories');

passConferenceSettings(conferenceSettings);

conferenceSettings

Pass conferenceSettings with conference specific ("hardcoded") data

I should contain:

tagColors - colors settings for "tech" badges, tags, labels

speakerAvatar = {
 dimensions: {
   avatarWidth: 500,
   avatarHeight: 500,
 }
}
  • image transformation settings for speakers/trainers/mcs and so on avatars

Develop

yarn dev to start watching and compiling the code

yarn storybook to launch Storybook

yarn tdd - Jest tests in watching mode

yarn start - starts dev, storybook and tests (each in independent watch mode)

yarn update-schema for updating GraphQL introspection schema

For publishing to NPM:

npm publish

it will transpile the code and publish the package

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.2.571latest

Version History

VersionDownloads (Last 7 Days)Published
3.2.571
3.2.46
3.2.30
3.2.20
3.2.10
3.1.331
3.1.320
3.1.310
3.1.300
3.1.290
3.1.281
3.1.271
3.1.260
3.1.250
3.1.240
3.1.230
3.1.210
3.1.200
3.1.190
3.1.181
3.1.170
3.1.160
3.1.150
3.1.141
3.1.130
3.1.121
3.1.110
3.1.100
3.1.90
3.1.80
3.1.70
3.1.61
3.1.50
3.1.41
3.1.30
3.1.20
3.1.10
3.1.00
3.0.630
3.0.620
3.0.610
3.0.601
3.0.590
3.0.580
3.0.570
3.0.560
3.0.550
3.0.540
3.0.530
3.0.521
3.0.510
3.0.500
3.0.491
3.0.480
3.0.470
3.0.461
3.0.450
3.0.441
3.0.430
3.0.420
3.0.411
3.0.400
3.0.390
3.0.381
3.0.372
3.0.360
3.0.350
3.0.341
3.0.330
3.0.320
3.0.310
3.0.301
3.0.290
3.0.280
3.0.271
3.0.261
3.0.250
3.0.241
3.0.231
3.0.221
3.0.210
3.0.190
3.0.180
3.0.170
3.0.160
3.0.150
3.0.140
3.0.130
3.0.120
3.0.110
3.0.100
3.0.91
3.0.80
3.0.70
3.0.60
3.0.50
3.0.40
3.0.30
3.0.20
3.0.10
3.0.00
2.3.71
2.3.60
2.3.50
2.3.41
2.3.30
2.3.20
2.3.11
2.3.00
2.2.11
2.2.00
2.1.31
2.1.20
2.1.10
2.1.01
2.0.40
2.0.30
2.0.21
2.0.10
1.4.10
1.4.00
1.3.60
2.0.01
1.3.51
1.3.40
1.3.30
1.3.11
1.3.01
1.2.51
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.01
1.0.20
1.0.00

Package Sidebar

Install

npm i @focus-reactive/graphql-content-layer

Weekly Downloads

105

Version

3.2.5

License

MIT

Unpacked Size

868 kB

Total Files

57

Last publish

Collaborators

  • pixelscommander
  • operatino
  • alex_hramovich
  • mcfrid
  • dogfrogfog
  • o8o0o8o