Skip to content

Commit

Permalink
v 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
usulpro committed Apr 11, 2020
1 parent b91bc0a commit a83d21b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# GitNation GraphQL Content Layer [![npm version](https://badge.fury.io/js/%40focus-reactive%2Fgraphql-content-layer.svg)](https://badge.fury.io/js/%40focus-reactive%2Fgraphql-content-layer)
[![npm version](https://badge.fury.io/js/%40focus-reactive%2Fgraphql-content-layer.svg)](https://badge.fury.io/js/%40focus-reactive%2Fgraphql-content-layer)
# GitNation GraphQL Content Layer

package for fetching conference content from GraphCMS

Expand Down
25 changes: 23 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"storybook": "start-storybook -p 6001 --ci",
"update-schema": "graphql get-schema",
"test": "jest",
"test:smoke": "jest tests/smoke.test.js",
"test:smoke": "jest tests/smoke.test.js --detectOpenHandles",
"tdd": "jest --watch",
"prepare": "package-prepare",
"prestart": "relative-deps",
Expand Down Expand Up @@ -69,5 +69,26 @@
"relativeDependencies": {
"@focus-reactive/storybook-addon-graphcms": "../../Addons/storybook-graphql-kit-graphcms/"
},
"license": "MIT"
"homepage": "https://github.com/GitNation/graphql-content-layer",
"bugs": {
"url": "https://github.com/GitNation/graphql-content-layer/issues"
},
"author": "Oleg Proskurin <[email protected]> (https://github.com/focusreactive)",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/GitNation/graphql-content-layer.git"
},
"keywords": [
"graphql",
"graphcms",
"query",
"queries",
"search",
"storybookjs",
"content",
"content-layer",
"gitnation",
"conference"
]
}
3 changes: 3 additions & 0 deletions src/fetch-diversity.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const fetchData = async (client, { tagColors, ...vars }) => {
const data = await client
.request(queryPages, vars)
.then(res => res.conf.year[0].diversity);
if (!data) {
return {};
}

let { maxTickets, sponsoredTickets } = data;

Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const getContent = async conferenceSettings => {
piece[k] = { ...content[k], ...piece[k] };
});
} catch (err) {
console.log('content, piece', piece);
console.error(err);
}
return { ...content, ...piece };
Expand Down
5 changes: 5 additions & 0 deletions tests/jsnation.conference-settings.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const conferenceTitle = 'React_Summit_Online';
const eventYear = 'Y2020';

const tagColors = {
NodeJS: {
tagBG: '#7AB464',
Expand Down Expand Up @@ -45,6 +48,8 @@ const speakerAvatar = {
};

module.exports = {
conferenceTitle,
eventYear,
tagColors,
speakerAvatar,
};

0 comments on commit a83d21b

Please sign in to comment.