14 Commits

Author SHA1 Message Date
Kamal Bennani Bouchiba
6482a6ec84
Merge branch 'master' into feature/allow-filtering-on-a-relation-attribute 2018-11-20 19:34:46 +01:00
Kamal Bennani
511ca55461
fix 1st level deep filter 2018-11-19 00:10:48 +01:00
Kamal Bennani
85eeb4aef2
Fix wrong rebase 2018-11-18 23:57:03 +01:00
Jim LAURIE
19ec6242f9
Merge branch 'master' into feature/allow-filtering-on-a-relation-attribute 2018-11-16 17:38:27 +01:00
Aurelsicoko
e28b69092d Use primaryKey to associate correct related entry in manyToOne association 2018-11-15 17:47:17 +01:00
Jim LAURIE
08ababab42 Fix lint 2018-11-10 11:37:02 +01:00
Jim LAURIE
5188d70d91
Merge branch 'master' into fix-graphql-many-to-many-relations 2018-11-09 12:07:52 +01:00
Jim LAURIE
163f7e6533 Fix lint 2018-11-07 16:19:31 +01:00
Nick Verwymeren
87d41103a4 merged in master 2018-11-06 13:12:26 -06:00
Jim LAURIE
b8d8f7a297
Merge branch 'master' into fix/2213 2018-11-05 17:28:56 +01:00
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
382f52a2e8
Convert GraphQL params to one level-deep object 2018-10-28 23:42:19 +01: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