Zapier add description to labels (#3787)
* Use object metadata graphql api to fetch input fields * Clean code * Clean code * Remove targetColumnMap * Remove duplicated testing * Fix labels
This commit is contained in:
@ -4,8 +4,13 @@ import { requestSchema } from '../utils/requestDb';
|
||||
|
||||
const objectListRequest = async (z: ZObject, bundle: Bundle) => {
|
||||
const schema = await requestSchema(z, bundle);
|
||||
return Object.keys(schema.components.schemas).map((schema) => {
|
||||
return { id: schema, nameSingular: schema.toLowerCase() };
|
||||
return schema.data.objects.edges.map((edge: any) => {
|
||||
const object = edge.node;
|
||||
return {
|
||||
id: object.nameSingular,
|
||||
nameSingular: object.nameSingular,
|
||||
labelSingular: object.labelSingular,
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user