Comments (3)
I can't fully understand your question, but this library is made specifically to work with SuiteCRM models and you are doing a regular query (without sanitizing input by the way).
If you just need a graphql interface for your data take a look at webonyx/graphql-php.
Also, graphql needs the response definition in advance, for example in your query you have ti.id, ti.name,
but you don't define what graphql types are those.
If that table is part of a SuiteCRM module, then you better use this as a guide https://github.com/lionixevolve/GraphQLSuiteCRm#extendingcustomizing-suitecrm-graphql-schema.
from graphqlsuitecrm.
@mrbarletta I would like to get data from suite CRM using graphql. So I created a custom file to write a query to get data from the relational table.
query Kanbantodoitems($kanban_ref: String) {
Kanbantodoitems(kanban_ref: $kanban_ref) {
id
name
due_date
priority
status
todo_order
description
priority
contact_id_c
}
}
It is working fine but when I am passing first_name at that time it will give me error field not found. Because first_name is relational table field. So How can I implement relation and return relational table result.
Thanks
from graphqlsuitecrm.
I am still finding hard to understand what do you mean by a relational table, SuiteCRM has models with relations, you have to use the model and its functions to get relationship data.
You can better understand this with the Account type, that has relationship with many other modules.
Here you can see how to get contacts related to the account:
https://github.com/lionixevolve/GraphQLSuiteCRM/blob/master/graphql/Schema/AccountType.php#L244
Also, please note that you are not defining fields in the build of your type
{
}
from graphqlsuitecrm.
Related Issues (18)
- Unable to load db manager HOT 8
- How to pass custom arguments in custom module queries? HOT 3
- Relational module Query and mutations HOT 5
- How to handle custom error in rest.php file HOT 1
- How to Improve Query and mutations Performance. HOT 5
- Additional field not working in custom Mutation (using custom module) HOT 1
- How to pass value in SuiteCRMSchema file HOT 1
- How to check authentication? HOT 1
- where to create middleware to check authentication on each request HOT 1
- GraphiQL no schema available HOT 1
- "message": "Unknown argument \"start_range_date_entered\" on field \"calls\"", HOT 5
- Return next offset when using offset parameter HOT 3
- Provide Proper documentation how to use this libary HOT 8
- Mutation not working HOT 1
- How to Create schema for custom modules HOT 4
- How to get records by descending order? HOT 2
- How to get total count of records with query result? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphqlsuitecrm.