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.

25 rivejä
510 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(input:{data:$input}){
  7. subscription{
  8. email
  9. }
  10. }
  11. }
  12. `,
  13. token,
  14. {
  15. input: {
  16. email:email
  17. },
  18. }
  19. );
  20. return res;
  21. }
  22. module.exports = {subscribe};