Closed rigalpatel001 closed 5 years ago
If you created the fields using Studio then nothing else should be done.
This section
public function build($config)
{
foreach (argsHelper::entityArgsHelper('Tasks', true) as $field => $type) {
$config->addField($field, $type);
}
}
Will go through the module available fields and add them to the valid arguments.
So if you added a field named mycustomfield_c
you can query the tasks module using
tasks( mycustomfield_c: "123"){
name
}
it will just work no need for anything else
In the case where you need a range, there are 2 automatically created arguments, start_range_NAMEOFTHE FIELD and end_rage_NAMEOFTHEFIELD.
For this example start_range_mycustomfield_c and end_range_mycustomfield_c
will be valid arguments to query.
Hello, Thanks for quick response. I have create custom module using module builder(I have not used studio to create custom modules)
So would you please provide example for custom module using module builder.
also I need custom module multiple mutations example. I have create custom module mutations and its working fine (Crud operations) but I want to add more mutations based on conditions, Would you please provide us example of how to define multiple mutations for same modules.
Thanks
Multiple mutation are not supported yet.
Regarding custom module, this is what you should do https://github.com/lionixevolve/GraphQLSuiteCRM#extending-the-schema-- but with the name of your custom module.
Hello,
I have create custom module queries and and mutations and its working fine. now i need to filter query based on different arguments. As per your documentations LitsType file is used for query.
I have make custom TaskListType.php file for query list of tasks and its working fine.
Now I want to used same method for tasklist query but add different arguments like tasklist based on start date,end date, developer wise tasks etc,
Would you please provide proper documentations or example how to add custom arguments in query.
Thanks