cyril lopez
377da271e4
Fix lint from master
2018-11-05 11:31:36 +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
Kamal Bennani
15a41614fa
Don't populate relations in Graphql context
2018-10-28 23:42:22 +01:00
Kamal Bennani
9862705f8f
fix rebase issue
2018-10-28 23:42:21 +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
382f52a2e8
Convert GraphQL params to one level-deep object
2018-10-28 23:42:19 +01:00
Nick Verwymeren
513558c8e9
Update GraphQL.js
2018-10-25 13:48:28 -05:00
Jim LAURIE
4ced536eaf
Remove logs Graphql
2018-10-18 14:33:08 +02:00
Ben Weller
1249909c46
re-add support for JSON graphql types
2018-10-12 13:29:18 -05:00
Jason Lei
3378403954
GraphQL Mutations, Aggregations, Decimals
...
Merging Mutations and Aggregations. Fixed Mongoose Hook to use Decimals (2 decimal places) and Floats (20 decimal places).
2018-09-10 16:05:00 +08:00
Nick Verwymeren
bd840d709e
Change comparison operator for array of id's
...
When there's an array of ID's present it looks like the Content Manager uses the '=' comparison which ends up returning an empty set. I think maybe the issue lies with the Content Manager plugin in that it should be using a 'IN' comparison if it detects an array. This is a workaround that seems to fix the issue. Although I'll be honest, I don't have enough knowledge of this plugin or the system to know if this will work for all edge cases.
2018-08-28 14:30:05 -04:00
soupette
8003982b08
Fix conflicts
2018-08-22 14:17:09 +02:00
Jim LAURIE
4bf88f8792
Merge branch 'master' into feature/graphql-aggregation
2018-08-21 10:36:09 +02:00
Jakub Skořepa
b7edcffff8
Fix the fix
...
It turns out that in some situations it actually is only the id instead of object (nested queries).
2018-08-08 00:05:33 +02:00
Jakub Skořepa
3645cc15f4
Fix one to many relation querying in the other direction
2018-08-07 14:42:33 +02:00
Kamal Bennani
c729b8381f
send method doesn't get copied when using object.assign
2018-07-29 15:01:54 +02:00
Kamal Bennani
0514521707
Make sure that the aggregation queries are only generated for models that uses Mongoose as ORM
2018-07-29 13:24:20 +02:00
Jim LAURIE
d116fabd16
Merge branch 'master' into patch-1
2018-07-23 12:26:56 +02:00
Jim LAURIE
f8febb5b8b
Merge branch 'master' into graphql-type-datetime
2018-07-17 12:28:37 +02:00
Erin Dachtler
c0554e8571
Fix for JSON attribute types in GraphQL
...
Fixes #1476
2018-07-12 12:37:19 -07:00
Johann Pinson
ffaa3fb92a
fix(graphql): add time
attribute type to DateTime scalar
2018-07-03 16:31:25 +02:00
Kamal Bennani
25eab80f64
Correctly detect an enum field
2018-06-26 18:23:18 +02:00
Kamal Bennani
aedf09bdcb
Add Enum and DateTime support in aggregation and drop lodash
2018-06-25 06:50:16 +02:00
cyril lopez
f056c44dd6
Fix conflicts
2018-06-22 14:17:32 +02:00
Johann Pinson
6bbc5c8993
fix(datetime): add datetime
and timestamp
detection
2018-06-20 19:09:37 +02:00
Jim LAURIE
684a90ca56
Merge branch 'master' into bug/graphql-do-not-formatted-values-of-type-object
2018-06-19 16:28:56 +02:00
Johann Pinson
1d4a193f7e
feat(graphql): add DateTime support instead of String
2018-06-19 11:13:32 +02:00
Kamal Bennani
fecf5c8ac4
Avoid using ctx.query because it causes all the object values to turn to a string
2018-06-18 23:10:46 +02:00
Kamal Bennani
f0af912825
Implement Graphql Aggregation Feature
2018-06-18 21:50:55 +02:00
Jim LAURIE
4a2452a55b
Merge branch 'master' into master
2018-06-14 16:06:11 +02:00
Johann Pinson
bdd1dc9e0d
fix(graphql): update enumeration detection
2018-06-13 22:23:48 +02:00
Daan De Deckere
732038593f
Use type ID for primary key instead of String.
...
Fixes #1356 .
2018-06-09 22:03:53 +02:00
Kamal Bennani
4920c1fa76
Set the entry type only when the value is defined
2018-06-08 20:27:45 +02:00
Johann Pinson
e215c70bbc
Merge branch 'master' into patch-graphql-enum
2018-06-08 19:43:29 +02:00
Johann Pinson
ac49805641
refactor(graphql): improve codebase array function + remove useless string template
2018-06-08 19:43:10 +02:00
Kamal Bennani
e9fc37d03a
Add comment to handle fields of type array
2018-06-08 02:39:52 +02:00
Kamal Bennani
b85baf568e
use default format for fields of type string and text
2018-06-08 02:38:32 +02:00
Kamal Bennani
a8da79c6f8
Place the break in the correct place
2018-06-08 02:37:56 +02:00
soupette
5698969770
Fix build
2018-06-05 19:03:59 +02:00
soupette
8302d32d71
Merge branch 'master' of github.com:strapi/strapi into content-manager-filters
2018-06-05 12:06:17 +02:00
Cyril lopez
cb895ab586
Fix PR feedback
2018-06-04 17:46:08 +02:00
Jim Laurie
78e064e72c
Fix missing file
2018-06-04 14:49:21 +02:00
Johann Pinson
eda412785f
feat(graphql): generate default name for Enum if not specified
2018-06-01 15:28:18 +02:00
Kamal Bennani Bouchiba
ff2543652f
Merge branch 'master' into bugfix/graphql-returns-empty-array-when-entities-are-not-hosted-by-the-model
2018-05-31 17:06:45 +02:00
Jim LAURIE
aeff4d663c
Merge branch 'master' into patch-graphql-required
2018-05-31 12:22:18 +02:00
Jim LAURIE
aee7157d5a
Merge branch 'master' into fix/graphql
2018-05-29 21:09:57 +02:00
Johann Pinson
ce2f41a5be
feat(graphql): enable enum creation into schema from model
2018-05-28 17:45:26 +02:00
Johann Pinson
be4a45b5dd
feat(graphql): add required flag
2018-05-28 17:31:42 +02:00
Kamal Bennani
ee89659347
fix lint
2018-05-26 18:46:56 +02:00