lionixevolve / GraphQLSuiteCRM

GraphQL SuiteCRM - Integrate with SuiteCRM using GraphQL
19 stars 2 forks source link

"message": "Unknown argument \"start_range_date_entered\" on field \"calls\"", #3

Closed lmons closed 6 years ago

lmons commented 6 years ago

when i try to use the payload below, i get this message error ("message": "Unknown argument \"start_range_date_entered\" on field \"calls\"",)

$payload='{"query":"{\n calls ( start_range_date_entered: \"2015-04-01\", end_range_date_entered: \"2015-06-01\") {\n \tname\n date_entered\n\t}\n}","variables":""}';

mrbarletta commented 6 years ago

Are you using the last version? "0.11.2"

Just did this query working fine in a large set and works fine.

query{
  calls(limit:2 start_range_date_entered:"20170801" end_range_date_entered:"20180203" ){
    name
    date_entered
  }
}

Used the GraphiQL to test it, you can login to the crm and then use it adding this to the crm URL vendor/lionixevolve/graphqlsuitecrm/graphql/GraphiQL/?query=query%7B%0A%20%20calls(limit%3A2%20start_range_date_entered%3A"20170801"%20end_range_date_entered%3A"20180203"%20)%7B%0A%20%20%20%20name%0A%20%20%20%20date_entered%0A%20%20%7D%0A%7D

lmons commented 6 years ago

thanks a lot for your interaction, it works with the new version, but when im trying to filter with another datetime "date_start" i get the same error.

query{ calls(limit:2 start_range_date_start:"20170801" end_range_date_start:"20180203" ){ id name status } }

mrbarletta commented 6 years ago

@lmons - you are right, I will debug it - but seems the field property is not datetime, which is weird.

mrbarletta commented 6 years ago

@lmons - fixed in v0.11.3 - please upgrade

lmons commented 6 years ago

@mrbarletta Thanks a lot it works now