cyril lopez
b06997014a
Fixes #2213
2018-10-30 17:27:43 +01:00
aissa-bouguern
cbf877074d
GraphQL many-to-many relations symmetry
...
Querying content types that share many-to-many relations do not return expected results.
Let's say we have a product content type and a category centent type. those two models share many-to-many relation, and when we are querying categories we have the expected result, Ex :
Query :
{
categories {
Name
products {
Name
}
}
}
Result :
{
"data": {
"categories": [
{
"Name": "Category 1",
"products": [
{
"Name": "Product 1"
}
]
},
{
"Name": "Category 2",
"products": [
{
"Name": "Product 1"
}
]
}
]
}
}
But when we're querying products, the categories array is empty!!
Query:
{
products {
Name
categories {
Name
}
}
}
Result:
{
"data": {
"products": [
{
"Name": "Product 1",
"categories": [ ]
}
]
}
}
categories should not be empty, it should be something like that :
...
"categories": [
{
"Name": "Category 1"
},
{
"Name": "Category 2"
}
]
....
I hope that was clear.
2018-10-29 22:36:39 +00:00
Jim LAURIE
20ee8f9e1e
Merge pull request #2225 from strapi/update/link_version
...
Update link version in left menu and fix typo in strapi-generate-new
2018-10-29 19:18:22 +01:00
aDeve
87512cc34b
update link of version in leftMenuFooter : redirect now to changelog.
...
fix typo in strapi-generate-new.
2018-10-29 18:50:30 +01:00
Jim LAURIE
a0216e12a4
Remove @alpha from code
2018-10-29 18:34:31 +01:00
Jim LAURIE
6ab40d9694
Merge pull request #2214 from maturanomx/fix/vulnerabilityAlert
...
Avoid alert vulnerability on projects at github
2018-10-29 13:05:52 +01:00
Jim LAURIE
bc6cc25a58
Merge branch 'master' into fix/vulnerabilityAlert
2018-10-29 13:05:44 +01:00
g-div
cca35fe9ac
fix(relations): avoid duplicate entries in manyToMany relations
2018-10-29 09:41:23 +01:00
Kamal Bennani
b9ad12f920
Add missing strapi-utils in the user-permissions package
2018-10-28 23:44:43 +01:00
Kamal Bennani
957368b8b2
Add a support of deep filter in bookshelf
2018-10-28 23:44:38 +01:00
Kamal Bennani
0ed9b7643a
Merge where and relation payload
2018-10-28 23:42:22 +01:00
Kamal Bennani
7801aac50f
Turn arrow functions to object functions to get to 'this'
2018-10-28 23:42:22 +01:00
Kamal Bennani
5bdb5c25e0
use stage functions from the relation file
2018-10-28 23:42:22 +01:00
Kamal Bennani
15a41614fa
Don't populate relations in Graphql context
2018-10-28 23:42:22 +01:00
Kamal Bennani
bbfb2418a5
Move functions that deals with stages to the mongoose relation file
2018-10-28 23:42:21 +01:00
Kamal Bennani
4d3d4c8d55
move utility functions to their own file
2018-10-28 23:42:21 +01:00
Kamal Bennani
ce534cf568
Take into account user model
2018-10-28 23:42:21 +01:00
Kamal Bennani
9862705f8f
fix rebase issue
2018-10-28 23:42:21 +01:00
Kamal Bennani
3c37c33d58
Rewrite the logic of deep population & matching
2018-10-28 23:42:20 +01:00
Kamal Bennani
2d1cf3591e
Split convertParams to multiple stage steps
2018-10-28 23:42:20 +01:00
Kamal Bennani
a84b640994
Make converQuery works also with array values
2018-10-28 23:42:20 +01:00
Kamal Bennani
d018e29a42
Use the correct hook folder path
2018-10-28 23:42:20 +01:00
Kamal Bennani
83da9fa38a
[Bugfix] take the correct localField when having a manyToOne RS
2018-10-28 23:42:19 +01:00
Kamal Bennani
382f52a2e8
Convert GraphQL params to one level-deep object
2018-10-28 23:42:19 +01:00
Kamal Bennani
4c3d5da8ee
Cast candidate ObjectID to Mongoose ObjectID
2018-10-28 23:42:19 +01:00
Kamal Bennani
e5ce8c1b42
use the new method to generate the collection name
2018-10-28 23:42:19 +01:00
Kamal Bennani
3593046c41
Add some docs
2018-10-28 23:42:18 +01:00
Kamal Bennani
f8d844a48a
Update user-permissions query logic for both bookshelf/mongoose
2018-10-28 23:42:18 +01:00
Kamal Bennani
ff0a87df7a
Update Bookshelf/Mongoose service template to support relation attribute filtering
2018-10-28 23:42:18 +01:00
Kamal Bennani
5506aef710
feat(filters): add logic to parse relations filter if exist
2018-10-28 23:42:18 +01:00
Kamal Bennani
de878dac4d
Add a utility function to get the table name for a many-to-many relation
2018-10-28 23:42:17 +01:00
Kamal Bennani
9d158303ff
Add pluralize lib to strapi-utils
2018-10-28 23:42:17 +01:00
Jim LAURIE
8e393492d2
Merge pull request #2218 from strapi/improvement/documentation
...
Documentation improvements
2018-10-28 11:15:06 +01:00
Pierre Burgy
e61d64fee5
Fix conflict
2018-10-28 08:16:13 +01:00
Pierre Burgy
f5780683ce
Improve documentation
2018-10-28 08:15:31 +01:00
entwicklerfr
dfca24c908
FIX Creating a user in AdminUI does not properly set provider type to local
2018-10-28 00:47:09 +02:00
Jim LAURIE
2f79437108
Merge pull request #2212 from jacargentina/fix-2211
...
Fix Content-Manager save not handling beforeSave hook throw error
2018-10-27 18:14:24 +02:00
Jim LAURIE
b7e850fed6
Merge branch 'master' into fix-2211
2018-10-27 18:14:17 +02:00
Jim LAURIE
7c583b7268
Update code style
2018-10-27 18:13:54 +02:00
Jim LAURIE
813bc90f5f
Merge pull request #2209 from feysalikbal/Fix/Added-missing-translation-keys-JA-language
...
Added missing translation key in JA language
2018-10-27 17:41:09 +02:00
Jim LAURIE
51618f651f
Update packages/strapi-plugin-content-type-builder/controllers/ContentTypeBuilder.js
...
Co-Authored-By: entwicklerfr <39570370+entwicklerfr@users.noreply.github.com>
2018-10-27 02:06:20 +02:00
Alberto Maturano
3d177d9984
Avoid alert vulnerability on github for projects
2018-10-26 18:09:03 -05:00
Javier Castro
ed924b057a
Fix #2211 : Content-Manager: save not handling beforeSave hook throw error
2018-10-26 13:49:14 -03:00
feysalikbal
7e323beee6
Added missing translation key in JA language
2018-10-26 19:22:40 +03:00
Jim LAURIE
afbc90ce9c
Merge pull request #2204 from virtual/patch-1
...
Fix typo getting started
2018-10-26 16:38:19 +02:00
Jim LAURIE
5845eedd0a
Merge branch 'master' into patch-1
2018-10-26 16:38:09 +02:00
Jim LAURIE
69f9c65a7b
Merge pull request #2199 from MartinMuzatko/docs
...
Fix search context filter in docs
2018-10-26 16:23:43 +02:00
Jim LAURIE
8e0e9a2c9e
Merge branch 'master' into docs
2018-10-26 16:23:19 +02:00
Jim LAURIE
5fe0fde52e
Merge pull request #2194 from peterjanes/master
...
Fix plugin installation when installed with yarn
2018-10-26 16:11:38 +02:00
Jim LAURIE
bf169a9194
Merge branch 'master' into master
2018-10-26 16:11:24 +02:00