Skip to content

Commit

Permalink
fix(schema): change query interface for singular resource
Browse files Browse the repository at this point in the history
BREAKING CHANGE: user resource name instead of "findOneResource"
  • Loading branch information
Peter Marton committed Jul 26, 2015
1 parent a07767c commit 3de8b59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,12 @@ function getSchema (models) {

// Create top level fields
var queryFields = reduce(types, (fields, type, typeName) => {
var name = `${typeName.toLowerCase()}`;

// TODO support multiple data: user, users

// TODO: args by index and _id
fields[typeName.toLowerCase()] = {
fields[name] = {
type: type,
args: {
id: {
Expand Down

0 comments on commit 3de8b59

Please sign in to comment.