• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html class="zc-html">
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid: Simple Grid</title>
    7. <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    8. <style>
    9. body {
    10. background: #e6e6e6;
    11. }
    12.  
    13. zing-grid[loading] {
    14. height: 148px;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <zing-grid caption="GraphQL Demo" pager page-size="10" sort filter>
    21. <zg-data src="https://us-central1-zingsoft-demo-endpoints.cloudfunctions.net/zinggrid-graphql-countries" adapter="graphql">
    22. <zg-param name="recordPath" value="data.countries"></zg-param>
    23. <zg-param name="readBody" value="getContinents"></zg-param>
    24. </zg-data>
    25. </zing-grid>
    26. <script>
    27. ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']);
    28. var getContinents = () => {
    29. return {
    30. query: `
    31. {
    32. countries {
    33. name,
    34. capital
    35. }
    36. }`
    37. };
    38. };
    39. </script>
    40. </body>
    41.  
    42. </html>
    1. <!DOCTYPE html>
    2. <html class="zc-html">
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid: Simple Grid</title>
    7. <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    8. </head>
    9.  
    10. <body>
    11. <zing-grid caption="GraphQL Demo" pager page-size="10" sort filter>
    12. <zg-data src="https://us-central1-zingsoft-demo-endpoints.cloudfunctions.net/zinggrid-graphql-countries" adapter="graphql">
    13. <zg-param name="recordPath" value="data.countries"></zg-param>
    14. <zg-param name="readBody" value="getContinents"></zg-param>
    15. </zg-data>
    16. </zing-grid>
    17. </body>
    18.  
    19. </html>
    1. body {
    2. background: #e6e6e6;
    3. }
    1. var getContinents = () => {
    2. return {
    3. query: `
    4. {
    5. countries {
    6. name,
    7. capital
    8. }
    9. }`
    10. };
    11. };