Commit graph

75 commits

Author SHA1 Message Date
SachaG
a523125da8 Use lowercase typeName for callbacks 2018-12-15 16:30:38 +09:00
SachaG
8fe3b7abfd Fix issue with addIntlFields callback 2018-12-15 16:27:06 +09:00
SachaG
c7423bc74e fix linting; "document" prop of update async callbacks should be new, updated document 2018-12-12 17:35:25 +09:00
neobii
baea826800 added collection creation hook 2018-12-11 03:25:17 -06:00
SachaG
50315bcf73 Fix linting 2018-12-02 10:28:04 +09:00
Sacha Greif
7ac988a4df
Merge pull request #2106 from lbke/warn-no-searchable
Warn when no searchable field is set and terms.query is set
2018-10-27 12:56:04 +09:00
Eric Burel
406b17d6d5 pass context to the defaultView too 2018-10-25 15:01:31 +02:00
Eric Burel
14535c1e61 add warning when no field is searchable and query is set 2018-10-19 15:53:33 +02:00
Apollinaire
b6cea13db2 Don't merge schema in Vulcan, only do it with SimpleSchema 2018-09-26 17:31:52 +02: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
SachaG
0f6b06023b Fix missing typeName/collectionName issue 2018-08-29 21:47:23 +09:00
SachaG
e565b84dce Differentiate between _intl and intl = true fields 2018-08-21 17:47:57 +09: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
ochicf
b55096855e added TODOs 2018-08-10 11:24:50 +02:00
SachaG
dd8b1a9857 Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel 2018-07-28 12:42:43 +09:00
Apollinaire
fefc21bb2f collection.getParameters handles schema extension for searchable fields
Instead of using `schema` passed when creating the collection, `getParameters` should fetch the schema from `collection.simpleSchema()._schema` to include the fields added with `collection.addField`.

I originally found this when making the `groups` field searchable, with: 
```
Users.addField([
  {
    fieldName: 'groups',
    fieldSchema: {
      type: Array,
      searchable: true,
    },
  },
  {
    fieldName: 'groups.$',
    fieldSchema: {
      type: String,
    },
  },
]);
```
2018-07-23 11:59:22 +02:00
SachaG
39ae84b81a New callback hooks: *.create.before, *.create.async, etc. act like previous mutation callbacks but run for all collections; foo.collection runs when collection is created. 2018-07-22 09:26:41 +02:00
SachaG
8a446680cf Minor fixes to form, mutators; query, and payments 2018-07-07 18:49:04 +02:00
SachaG
b2fc0d0c5b Use Utils.pluralize function 2018-07-04 11:11:46 +02:00
SachaG
35c811e791 Fix form error labels to work with intl fields 2018-06-30 11:48:37 +02:00
SachaG
dc3d8f8ec0 Refactor 2018-06-28 21:54:45 +02:00
SachaG
2d2d1033b5 Enable required locale validation for individual locales; add support for intl: true on schema fields 2018-06-28 21:35:44 +02: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
629e4c2c58 Minor clean-ups 2018-06-17 08:00:19 +09: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
d4193fd7e5 Merge branch 'devel' into opencrud
# Conflicts:
#	packages/vulcan-lib/lib/modules/collections.js
2018-06-14 09:55:52 +09:00
SachaG
b0e7c4bf97 Only reset store when intl fields exist 2018-06-14 08:47:58 +09:00
SachaG
4da86c44a3 Add support for sortable property (bool/string) on datatable columns to make them sortable 2018-06-12 15:24:17 +09:00
SachaG
f3c1f7bf31 isolate accounts-base dependency 2018-06-10 11:39:18 +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
f3ba2cc59f Working on GraphQL template system for GraphQL schema generation 2018-06-04 11:22:49 +09:00
SachaG
96eab44309 Start CRUD renaming 2018-06-02 18:49:53 +09:00
SachaG
1f389dbf0a Intl fields should not appear in forms 2018-05-29 18:02:15 +09:00
Erik Schannen
373857131a SubSchema Fields
- Added support for fields that have their own subschema
- The code flattens the subschema fields, so the path for `address: { street }`` becomes `'address.street'`
- Several places needed to be changed to properly support paths, so `currentValues[path]` becomes `get(currentValues, path)`
- In Form.getData(), replaced underscore's `pick` with lodash's `pick` which properly supports paths and returns a new object
- Fixed a bug in collection.getParameters that made it impossible to specify a `limit` with addView or addDefaultView
2018-05-23 16:02:36 -04:00
SachaG
2b0f8cdd88 Change data structure of translations in db to match MongoDB standards 2018-05-21 09:42:08 +09:00
SachaG
47f21e4740 Eslint clean up 2018-05-10 09:39:35 +09:00
Sebastian Grebe
90c3e8d2cd
Add MongoDB aggregation to Collections
It would be great to allow mongodb aggregation. I am personally using geoNear for example.
2018-04-21 11:40:56 +02:00
SachaG
5534ab7430 Add amount property to charges schema; add addSubscriptionProduct; various other fixes 2018-03-08 10:48:35 +09:00
SachaG
908a570664 Fix Intercom ID, fix withList context issue 2018-02-05 10:45:51 +09:00
Justin Reynolds
0b9289d549 #1865 Fix upsert 2018-01-31 18:29:49 -06:00
Justin Reynolds
9212a1970e Add upsert mutation 2018-01-28 22:26:05 -06:00
SachaG
13a2453009 Merge branch 'vulcan-updates-jan-2018' of https://github.com/justinr1234/Vulcan into justinr1234-vulcan-updates-jan-2018
# Conflicts:
#	packages/vulcan-forms/lib/components/Form.jsx
#	packages/vulcan-lib/lib/modules/utils.js
2018-01-27 12:30:33 +09:00
Justin Reynolds
651e3e6866 Fix circular dependencies between schemas and collections 2018-01-26 16:41:30 -06:00
SachaG
0a40e57312 only add search parameter if there are searchable fields 2018-01-26 18:41:29 +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
fec2fc8321 Document query and mutation arguments 2018-01-02 13:13:56 +09:00