Q:

How do I insert id into GraphQl query from a .ts method

I have a method that that gets data from a GraphQl query.   What I am trying to do is pass the variables token and passID into the graphQL query.
saveData ( auditid: any ) {
  this.storage.get('AccessToken').then((_token) => { 
    var passID = auditid.toString();
    var token = _token;

    this.apollo.watchQuery(
      {      
      query: gql`
      {
        gechecklist( id:$passID, accesstoken:$token )
        {
          Type,Name,
          Sections
        }
          ,ID
        }
      }
    `,
      fetchPolicy: 'cache-first',
    })
    .valueChanges.subscribe(( result: ApolloQueryResult<any> ) => {
      let sections = result.data.gechecklist[0].Sections;
      this.storage.set( name, JSON.stringify( sections )).then(() => {
      this.listKeys();
      });
    });
  });
}

A:

watchQuery takes a variables parameter. See the query documentation.
var passID = auditid.toString();
var token = _token;

this.apollo.watchQuery({      
  query: gql`{
    gechecklist( id:$passID, accesstoken:$token )
    {
      Type,Name,
      Sections
    }
      ,ID
    }
  }`,
  variables: { passID, token },
  fetchPolicy: 'cache-first',
})

