Open abhirham opened 4 years ago
@abhirham I was having the same issue after I upgraded to Apollo Server 2.0. In order to fix it I had to add an explicit mapping from graphql field to sql column. Example:
{
...
Customer: {
sqlTable: 'ALL_CUSTOMER',
uniqueKey: 'ALL_CUSTOMER_ID',
fields: {
firstName: { sqlColumn: 'first_name' }
}
},
}
Below is my app.js.
Here is my schema:
Here is the query:
Here is the sql generated by joinmonster:
As you can see, I am requesting for
FIRST_NAME
, but joinmonster is not including it in the generated sql.This is not the case when I use
express-graphql
. It works fine. Here is the link to my stackOverflow with all the details: https://stackoverflow.com/q/60868650/6425689