您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

26 行
523 B

  1. import apollo from "@/lib/apollo.js";
  2. async function subscribe(email,token="") {
  3. var res = await apollo.mutation(
  4. `
  5. mutation($input: SubscriptionInput!){
  6. createSubscription(data:$input){
  7. data{
  8. id
  9. }
  10. }
  11. }
  12. `,
  13. token,
  14. {
  15. input: {
  16. Email:email,
  17. publishedAt:new Date()
  18. },
  19. }
  20. );
  21. return res;
  22. }
  23. module.exports = {subscribe};