Giter Club home page Giter Club logo

docs's Introduction

docs's People

Contributors

leebenson avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docs's Issues

Add "Common issues"

Hi Lee,

since I've upgraded reacql to v 3.0.0 I am having problems installing node-sass on my windows machine. There is an issue with permissions. Installing with admin privileges does help.

but running npm rebuild node-sass helps.

This problem is well described on node-sass github.

I thought I'd be nice to have "Common issues" section/page in the docs. It will save a lot of time for newcomers.

No documentation examples of nested fields with arguments.

I cannot seem to figure out how to satisfy the webpack compiler nor the tooling used to build the schema so that it will let me have arguments on nested fields.

location: {
description: 'A query allowing search of Inventory Locations',
type: new GraphQLList(Location),
args: {
id: {
type: GraphQLInt,
},
locationName: {
description: 'The Location Name to search for.',
type: GraphQLString,
},
offset: {
description: 'The offset for the database query, for example 10 would return results 11 and beyond.',
type: GraphQLInt,
},
limit: {
description: 'The row limit, for example, setting this to 25 will return a maximum of 25. When combined with offset, can be used to paginate.',
type: GraphQLInt,
},
},
resolve(root, args) {
return InventoryDb.models.location.findAll({
include: [
{
model: InventoryDb.models.inventoryItem,
// limit: args.limit,
// offset: args.offset,
through: {
// model: InventoryDb.models.locationInventory,
attributes: ['locationItemPrice', 'locationItemOnHand'],
},
order: [
['id', 'asc'],
['inventoryItems.id', 'asc'],
],
},
{
model: InventoryDb.models.person,
through: {
model: InventoryDb.models.locationEmployees,
attributes: ['jobTitle'],
},
order: ['id', 'asc'],
},
],
where: args,
order: [
['id', 'asc'],
],
});
},
},

The query :

query{ location(id: 2, limit: 2) { id locationName items(limit:3){ id itemName } } }

I need the arguments for the limit and offset to work, but they are not valid arguments and the query errors.

How should I construct the query schema so that these will function properly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.