You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 regels
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};