Commit graph

47 commits

Author SHA1 Message Date
SachaG
8330accba7 centralize error throwing in new throwError function 2018-12-02 10:01:48 +09:00
SachaG
fa2fe776de Revert some of the changes in #2112 (fix #2118) 2018-11-04 12:58:16 +09:00
Eric Burel
10603d000f new behaviour: single resolver returns null if documentId is not defined 2018-10-29 18:53:31 +01:00
Eric Burel
4dda9919fe prettier commit :) 2018-10-29 18:36:18 +01:00
SachaG
335cda6cf0 Improve thrown errors 2018-10-10 17:35:01 +09:00
Erik Dakoda
9be92d0903 - Fixed bug in single resolver (slug is undefined)
- Fixed bug in Utils.pluralize (pluralizing words ending in 's', for example address => addresses)
2018-09-13 10:46:10 -04:00
Erik Dakoda
b8ed1cdc06 - Fixed bug in single resolver 2018-09-10 06:48:14 -04:00
Erik Dakoda
d5b677e28d - Added collection.options.singleResolverName and .multiResolverName to stay DRY
- In withMulti, fixed how loadMoreInc passes variables to fetchMore
- Added the "allowNull" option to single resolver to return null instead of throwing a MissingDocumentError
- Added extended SimpleSchema options to support "unique" field property (field can be used as part of a selectorUnique when querying for data)
- When generating schema, populate fields.selector and fields.selectorUnique
2018-09-10 06:16:00 -04:00
SachaG
5d1a7d2c37 Replace documentId/slug with selector in single resolver 2018-08-29 20:36:30 +09:00
ochicf
b31ff85b8c merge mutation and resolver options
This makes possible to only specify a subset of options.

As an example, imagine we want to pass a customized `updateCheck` function to `getDefaultMutations`. Before this commit options weren't merged, so all of them had to be specified:

```
getDefaultMutations({
  typeName,
  collectionName,
  options: {
    create: true,
    update: true,
    upsert: true,
    delete: true,
    updateCheck: () => true,
});
```

After the commit:

```
getDefaultMutations({
  typeName,
  collectionName,
  options: {
    updateCheck: () => true,
});
```
2018-08-10 11:50:56 +02:00
ochicf
9e9d818678 collectionName can now be specified as an argument 2018-08-10 11:24:38 +02:00
SachaG
4f80444743 Better debug logging 2018-06-25 08:41:44 +02:00
SachaG
d9bc8b8c88 New default mutations/default resolvers API 2018-06-17 07:49:33 +09:00
SachaG
51acfa7ffc Migrate new callbacks to new single argument API 2018-06-15 10:18:20 +09:00
SachaG
60f47a5189 Various small fixes (thanks @justinr1234) 2018-06-08 13:31:15 +09:00
SachaG
ad1f47ef73 Make debug email routes work with new APIs 2018-06-06 11:39:04 +09:00
SachaG
a532dab9b7 singleInputTemplate should use selectorUniqueInputTemplate 2018-06-06 11:00:53 +09:00
SachaG
f1652ae025 arguments -> args 2018-06-06 09:07:13 +09:00
SachaG
20db318c40 More work on withMulti and withSingle 2018-06-05 12:12:04 +09:00
SachaG
809bdd05de Adapting withMulti and withSingle 2018-06-05 11:51:25 +09:00
SachaG
1d3921287c Refactored GraphQL schema generation code to use new GraphQL templates 2018-06-05 10:04:20 +09:00
SachaG
96eab44309 Start CRUD renaming 2018-06-02 18:49:53 +09:00
SachaG
52256b2a60 Small fixes 2018-05-09 11:22:51 +09:00
SachaG
4fb3047f1f remove console.log 2018-04-24 10:21:20 +09:00
SachaG
b4f960301b Isolate bootstrap dependencies in new vulcan-ui-bootstrap package 2018-04-23 09:47:04 +09:00
SachaG
59c12c27d2 Log slug in default resolver; add rowClass prop to Datatable 2018-04-06 17:59:24 +09:00
SachaG
861e65e641 Refactor connectors code to avoid repeating getSetting 2018-03-03 11:39:56 +09:00
SachaG
faf92b3650 Use better API (create, update, delete, find, get) 2018-02-12 18:55:37 +09:00
SachaG
7639801434 Split out Mongo operations into connectors 2018-02-11 12:57:51 +09:00
SachaG
da300fe8a7 Add missing "}"; fix formatting 2018-01-29 10:09:31 +09:00
Justin Reynolds
4ef51afaac Respect checkAccess for total resolver 2018-01-28 09:59:51 -06:00
Luca Hagel
1ecf8eb4ec Stringify logged objects 2018-01-06 13:46:31 +01:00
Luca Hagel
bdc05e1bc1 Add indentation groups & color escape sequences to cb & resolver logs 2018-01-06 13:40:40 +01:00
SachaG
6659bd14e6 Add support for throwing/showing "document not found" errors in withDocument and default resolvers 2018-01-04 09:41:48 +09:00
SachaG
05084e6fb5 Add support for GraphQL comments/descriptions for fields, queries, mutations, types 2018-01-02 13:04:33 +09:00
SachaG
0cbb904f2d Set enableCache when defining HoC rather than when defining resolvers for more granularity 2017-12-13 18:39:19 +09:00
SachaG
574f08c449 Enable Engine caching 2017-12-08 20:54:23 +09:00
SachaG
68351674da Work on adding caching option to default resolvers; add loadingMore prop to withList 2017-11-30 23:08:27 +09:00
Sacha Greif
f5c2d21274 Small fixes; Default newsletter to *not* be automatically sent out 2017-10-14 11:06:25 +09:00
SachaG
24ccf1ff95 Various fixes 2017-10-05 09:14:42 +09:00
SachaG
c52e53afbe Make runParameters callbacks support async 2017-09-22 16:20:07 +02:00
SachaG
af1528aca8 improve seeding & debugging 2017-09-15 11:14:09 +02:00
SachaG
7777fcbcf7 Do not validate required fields on edit operation 2017-09-11 15:55:25 +02:00
SachaG
b205034b33 modify resolvers to return first post/user/etc. by default 2017-08-20 16:13:28 +09:00
SachaG
2cf193af1e Improve image upload form styling; pass context to parameters callback 2017-08-05 14:46:02 +09:00
SachaG
8703a7c303 include user edit modal inside admin package; fix default avatar; admins can now perform every action; include form styles in form package; small form fixes 2017-07-19 16:55:51 +09:00
SachaG
7ff1ada7d9 add new default resolvers and default mutations; improve the way field resolvers are defined 2017-07-03 10:54:10 +09:00