codeLive: How to Work with GraphQL Wire Adapter for LWC
ฝัง
- เผยแพร่เมื่อ 7 ก.ย. 2024
- In this session we will learn how to fetch data using client-side JavaScript with GraphQL Wire Adapter for LWC. We will learn how the GraphQL Wire Adapter enables you to add filtering, sorting and pagination within your LWC JavaScript without needing Apex.
It was such a nice session. Nicely explained.
Good to know the new feature. Thanks a lot.
How to pass record Id variable in graphql query
Simply use the where clause on it. Something like below
query contacts {
uiapi {
query {
Contact(orderBy: {Name: {order: DESC}}, where: {Id: {eq: "put your Id here"}}) {
edges {
node {
Id
LastModifiedDate {
value
}
Name {
value
}
Id {
value
}
}
}
}
}
}
}