Commit graph

42 commits

Author SHA1 Message Date
SachaG
ea7cd23533 Field resolvers should check for access (fix #2124) 2018-11-23 09:26:56 +09:00
SachaG
4fcd37cde7 Add warnings when no mutable fields have been defined 2018-09-18 08:32:32 +09:00
SachaG
5fc0e30f40 Fix ESLint 2018-09-12 11:59:00 +09: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
Sacha Greif
26f28a98ce Rework required field validation to make it work for intl fields when creating new documents
1. make intl fields use [IntlValue] and [IntlValueInput] types
2. add isIntlData marker to fields storing intl data
3. only validate intl fields that are marked as required
4. remove all instance of `__typename` from documents in edit forms
2018-08-17 19:02:44 +09:00
SachaG
b2fc0d0c5b Use Utils.pluralize function 2018-07-04 11:11:46 +02:00
SachaG
6201b55837 insertableBy -> canCreate 2018-06-22 20:57:31 +09:00
SachaG
50fba6b0a3 viewableBy -> canRead 2018-06-22 20:55:22 +09:00
SachaG
a7081f71c1 Show warning when collections have no GraphQL-enabled fields 2018-06-20 10:24:57 +09:00
SachaG
367c071fc0 Move mutation/query generating logic to graphql.js; do not crash when schema has no GraphQL-compatible fields 2018-06-17 13:24:09 +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
dbabb98ed4 Fix spacing and case 2018-06-05 10:17:59 +09:00
SachaG
1d3921287c Refactored GraphQL schema generation code to use new GraphQL templates 2018-06-05 10:04:20 +09:00
SachaG
2b0f8cdd88 Change data structure of translations in db to match MongoDB standards 2018-05-21 09:42:08 +09:00
SachaG
5b5884d33c Move intl logic to vulcan:lib (keep vulcan:i18n with same API as react-i18n); add isIntlField helper; add IntlString type 2018-05-08 12:23:42 +09:00
SachaG
ede0fb48e4 Intl field need a JSON input type 2018-05-08 11:55:45 +09:00
SachaG
9700c4bbaf Not using IntlString scalar anymore 2018-05-08 11:06:31 +09:00
SachaG
2c03bd352a Use two-field strategy for getting all locale strings 2018-05-08 11:05:24 +09:00
SachaG
55800a9b30 Add support for intl fields to API and SmartForm 2018-05-07 17:41:22 +09:00
SachaG
1ab36a7e3c Add support for custom directives 2018-05-07 17:40:21 +09:00
SachaG
268090dcb2 Working on nested forms support 2018-03-22 19:22:54 +09:00
SachaG
987d537b15 autogenerate type when possible 2018-03-19 14:57:44 +09:00
Justin Reynolds
75b6ece0a4 Fix linting 2018-01-25 15:03:03 -06:00
SachaG
c131ccb167 Make sure GraphQL schema is properly formatted when outputted as a string 2018-01-25 18:12:26 +09:00
SachaG
997ffda955 Require insertableBy/editableBy/viewableBy for a field to be added to GraphQL schema 2018-01-02 13:05:03 +09:00
SachaG
05084e6fb5 Add support for GraphQL comments/descriptions for fields, queries, mutations, types 2018-01-02 13:04:33 +09:00
SachaG
7bfa4afba3 Do not generate default fragment when empty 2017-09-25 22:08:17 +02:00
SachaG
69dc464902 clean up notifications/email code 2017-08-24 13:16:50 +09:00
ochicf
a25cb4b30b Allow graphql types to implement interfaces
A collection now can be created with the `interfaces` option (passed to `createdCollection` function) with the names of the interfaces to implement. Here they are handled to create the graphql type.
2017-07-22 11:19:51 +02:00
SachaG
a6e3ee85d6 keepOriginal -> addOriginalField 2017-07-14 10:37:19 +09:00
SachaG
7b4d6912e5 make resolveAs accept GraphQL arguments 2017-07-14 10:07:48 +09:00
SachaG
f3ac2a03f9 add keepOriginal option to resolveAs to keep original schema field in GraphQL schema 2017-07-08 11:43:43 +09:00
SachaG
8b1ffd309a automatically resolve fields with an associated array 2017-07-07 20:39:57 +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
SachaG
de76f6404d add posts component to admin dashboard 2017-06-21 15:03:38 +09:00
SachaG
59f4f6a8df enable blank Input schemas (for when no editableBy or insertableBy fields are defined) 2017-06-20 10:44:19 +09:00
SachaG
e87fc07351 generate input fragment even if no input fields exist 2017-06-19 21:48:22 +09:00
SachaG
0369d19c10 Telescope -> Vulcan; add Vulcan.getGraphQLSchema on the server 2017-04-06 11:10:23 +09:00
SachaG
641ec97a93 Add a way to remove a GraphQL resolver 2017-03-29 16:43:52 +09:00
SachaG
5bad048505 Add dbCollectionName option to createCollection 2017-03-29 15:49:07 +09:00
SachaG
72be56a590 renaming nova-xyz directories to vulcan-xyz 2017-03-24 10:19:24 +09:00
Renamed from packages/nova-lib/lib/modules/graphql.js (Browse further)