Angular dependency injection into an export function
问题 I am using apollo graphql, and it has a module with a function inside of it. export function createApollo(httpLink: HttpLink, connectToDevTools: true){ Inside this function you define the url for the graphql endpoint const uri = http://127.0.0.1/graphql for instance. I would like to import this url form a service (so that I only have to change the backend server url in one place), but I can not inject the service, for the property stays undefined. export function createApollo(httpLink: