GraphQLAPI.jade 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. head
  2. meta(charset='UTF-8')
  3. title GraphQL API
  4. body
  5. div
  6. h1 GraphQL API
  7. table(style="width:100%; display:fixed")
  8. tr
  9. th Graphql Playground
  10. th FisApp Request
  11. th FisApp Response(s)
  12. tr
  13. td(style="border:solid 1px lightblue",valign="top")
  14. form(method='POST' action=jadeargument['action'])
  15. table
  16. tr
  17. td
  18. b Step 1 : Create your query
  19. tr
  20. td
  21. b(style="font-weight:normal")
  22. |( or Load default query
  23. select(name="defaultQuery" onchange="this.form.submit()")
  24. each item in jadeargument['defaultQuery']
  25. if(item.queryName === jadeargument['defaultQueryValue'])
  26. option(value = item.queryName selected) #{item.queryName}
  27. else
  28. option(value = item.queryName) #{item.queryName}
  29. b(style="font-weight:normal")
  30. |)
  31. tr
  32. td
  33. iframe(style="resize:both", width='700', height='750', src=jadeargument['graphql_url'], frameborder='0')
  34. td(style="width:40%;background-color:lightblue;padding", valign="top")
  35. form(method='POST' action=jadeargument['action'])
  36. table
  37. tr
  38. td
  39. b Step 2 : Copy Paste your query as Query Payload
  40. p
  41. u Query Header
  42. tr
  43. td
  44. textarea(name="header", cols="60", rows="32",style="width:100%")=jadeargument['header']
  45. tr
  46. td
  47. u Query Payload
  48. tr
  49. td
  50. textarea(name="payload", cols="60", rows="10",style="width:100%")=jadeargument['payload']
  51. input(type='submit' name='Submit' value='Click Here to Test FisApp Query >')
  52. td(style="width:100%;background-color:lightblue;padding:5px", valign="top")
  53. b Step 3 : Check the Response(s) here
  54. p
  55. u Query Response(s)
  56. textarea(name="response", cols="60", rows="45",style="width:100%" , wrap="off")=jadeargument['response']
  57. p
  58. b When you have the desired query, you can proceed to POST it to http://swopt.com:3011/request to get the response(s).
  59. br
  60. span (Refer to http://swopt.com:3000/stephenwong/microservice-cqrs-server 's Method 2 for more information.)
  61. tr
  62. td(style="width:100%;padding:5px", colspan="3")=jadeargument['message']