Skip to content

0xR/design-by-contract-with-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installing

npm install

GraphQL

npm start

Browse to http://localhost:3000/graphiql

Example query:

query {
  search(query: "jeans", offset: 4, limit:4) {
    total
    results {
      id
      name
      description
      price
    }
  }
}

Search result JSON validator

# Get some validation errors
echo '{"asdf":4 }' | node ./development/run src/validator

# Also available as
npm run demo:validator:error

# Try a valid search result
cat ./development/search_result.json | node ./development/run src/validator

# Also available as
npm run demo:validator

Mock data client

An example client is availabe at src/client.js.

# Run the client
npm run run demo:client

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published