A wrapper around the Nexus REST API using GraphQL.
- Overview
- Nexus REST API
- Getting Started
- Example Queries
Using GraphQL with the Nexus API could simplify syncing operations to data warehouses, websites etc.
This project uses:
- apollo server
- graphql-tools to generate the schema
- GraphQL Playground for exploring the GraphQL
The documentation for the Nexus API is available here: https://developer.knowledge-architecture.com
Any questions related to the functionality of the Nexus REST API should be directed to support@knowledge-architecture.com
Clone this repo and run npm install
git clone https://github.com/andrewgodwin86/nexus-graphql-server <my-directory>
cd <my-directory>
npm install
Create a file named .env
in the root of the project folder and define the KA_CLIENT_ID and KA_CLIENT_KEY variables as follows:
KA_CLIENT_ID="YourClientID"
KA_CLIENT_KEY="YourClientKey"
You can request your client ID and client key from Knowledge Architecture.
Run the start script
npm start
The GraphQL endpoint will be available at http://localhost:4000/graphql
Copy and paste the following query snippets into GraphiQL and hit play!
A list of projects with some additional details
{
projects {
project {
projectNumber
projectName
clientName
city
state
country
employeeCount
}
}
}
TO-DO: Reimplement StreamItems defs A list of Stream Items and their data
{
streamItemList {
streamItemDetails {
titleWithEntityNames
contentWithEntityNames
dateStamp
displayEntityType
itemType
likeCount
commentCount
authorName
mentionsList {
entityID
entityType
entityName
communitySiteID
publicSite
deleted
}
hashtagsList {
hashtagID
}
likesList {
authorID
authorName
}
}
}
}