-
Notifications
You must be signed in to change notification settings - Fork 5
Using GraphQL in Zimlets
Peter Lenahan edited this page Jul 10, 2019
·
5 revisions
import gql from 'graphql-tag';
import { graphql } from 'react-apollo';
@graphql(gql`
query AccountInfo {
accountInfo {
id
prefs {
zimbraPrefGroupMailBy
}
}
}
`)
class MyClass extends Component {
render({ data }) {
const { loading, error, accountInfo } = data;
return loading ? (
'Account Info Loading...'
) : error ? (
`Account Info ERROR: ${error}`
) : (
<div>Some data from accountInfo: {accountInfo.prefs.zimbraPrefGroupMailBy}
);
}
}
- Home
- Client Tool
- Getting Started
- Creating Your Zimlet
- Zimlet Design Patterns
- Advanced