Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

25 rader
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};