Course Project of DSCI558: Knowledge Graph
2KKG is a simple knowledge graph applications using JSON data managed entirely via a GraphQL layer called Staple API. It involves:
Change MongoDB Config inside demo.js
create a file named secret.js
and type
function define(name, value) {
Object.defineProperty(exports, name, {
value: value,
enumerable: true,
});
}
define('mongoDBPassword', 'CHANGE_TO_YOUR_OWN_PASSWORD');
npm install
node demo.js
Warning: if run first time, need to npm dedupe
when saw error "Error: Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm." then node demo.js
again.
simply add /graphql at the end of your local server address
Go to Repl.
Create a Repl with node.js
or click import from github
with link https://github.com/rzhu1999/2K-KG
npm install
Click Run
Warning: if run first time, need to npm dedupe
when saw error "Error: Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm." then click Run
again.
NBA 2K is a sports simulation game for basketball and has been the Sports Game of the Year for a couple of years. It uses real-life NBA players' data plus some unique features such as 2K ratings & skill badges of each player. Badges are an attribute of a player’s signature skills, personality, special abilities, and advantages.
The purpose of making this knowledge graph is to aggregate and collect information both in reality and in the 2K game about NBA players. This knowledge graph allows users to understand players' characteristics and performances better.
Staple API takes a specified RDF ontology, a configuration of the back-end source, and automatically spins-up a ready GraphQL service, with a a corresponding schema and resolvers.