Comments (11)
Something like
import fetch from 'node-fetch';
new ApolloServerPluginUsageReporting({
fetcher(url, options) {
return fetch(url, {...options, agent: myAgent});
}
})
?
from apollo-server.
Hi @glasser is this repo active/being maintained?
from apollo-server.
Yes, but not by me personally, and most of Apollo was on vacation starting right around when you filed the issue :)
Also, this is more specifically a part of Apollo Server rather than federation-specific, so I will move this issue to that repository. That said, I will then close it for now because there's not enough information to reproduce — at the very least we will need the version of Apollo Server you're using.
from apollo-server.
Yes, but not by me personally, and most of Apollo was on vacation starting right around when you filed the issue :) Also, this is more specifically a part of Apollo Server rather than federation-specific, so I will move this issue to that repository. That said, I will then close it for now because there's not enough information to reproduce — at the very least we will need the version of Apollo Server you're using.
@glasser Thanks for the response, these are the versions we're using:
"@apollo/gateway": "^2.5.1",
"@apollo/server": "^4.9.0",
"@apollo/server-plugin-landing-page-graphql-playground": "^4.0.1",
"@apollo/server-plugin-response-cache": "^4.1.3",
"@apollo/subgraph": "^2.5.1",
Can you please leave the link here when you open the issue in the other repo, or at least point me where I should open it, I can do so as well.
from apollo-server.
Hi, this was transferred in place to this repo.
I assume you are also using @as-integrations/azure-functions
? It might make more sense to start this discussion at https://github.com/apollo-server-integrations/apollo-server-integration-azure-functions as this might be an Azure-specific concern.
from apollo-server.
That said, the usage reporting plugin uses the standard fetch
API to do HTTP and you can customize this with the fetcher
option. By default it uses node-fetch
, so you could use that yourself adding an agent
of your choice to the call.
from apollo-server.
That said, the usage reporting plugin uses the standard
fetch
API to do HTTP and you can customize this with thefetcher
option. By default it usesnode-fetch
, so you could use that yourself adding anagent
of your choice to the call.
Yes I'm aware of that, I know I can pass the fetcher, but how can I pass the options to which the fetcher will use when it's called? maybe I'm missing something here, would you mind sharing an example of how it can be achieved?
from apollo-server.
Hi, this was transferred in place to this repo.
I assume you are also using
@as-integrations/azure-functions
? It might make more sense to start this discussion at https://github.com/apollo-server-integrations/apollo-server-integration-azure-functions as this might be an Azure-specific concern.
Yes I'm using the @as-integrations/azure-functions
, is there a specific implementation of the ApolloServerPluginUsageReporting
for Azure then?
from apollo-server.
And no, you're correct that the plugin is generic, but it's possible that there are other aspects of running in Azure Functions that the AF integration maintainers may be more knowledgeable about (eg, how "background" operations like publishing usage reports might work best in that context).
from apollo-server.
@glasser That makes sense, I'll give it a try, thanks 🙏
from apollo-server.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
from apollo-server.
Related Issues (20)
- Apis that have their requests cached dont need to make unnecessary auth token fetches
- Document known mitigated security issue in `@koa/cors` for AS3 users HOT 1
- Update `@koa/cors` dependency for AS3 (or why we don't intend to) HOT 2
- Share and modify variables between Express and the GraphQL/Apollo server HOT 1
- Error: ApolloServer<BaseContext>' is not assignable to type 'ApolloServer<ExpressContext> HOT 3
- callback function for onSchemaLoadOrUpdate when upgrading from AS v3 to AS v4 HOT 3
- Allow plugins to throw meaningful GraphQL errors
- Getting started tutorial has typescript issues...
- Delay when subscription is closed on client side of the router when using callback
- Documentation and dynamic cache control feature of Apollo leverages incompatible GraphQl type interface. HOT 4
- Disabling introspection should also disable "Did you mean ...?" HOT 3
- Undefined 'code' TypeError within errorNormalize HOT 2
- Link broken for plugin
- The server crashes if a promise with deferred handling rejects while another promise is trying to resolve HOT 8
- Upgrade Express version to mitigate the Open Redirect Vulnerability in Express.js for malformed URLs, specifically targeting versions below 4.19.2. HOT 1
- Marking text works unreliable HOT 3
- CodeSandbox setup is failing HOT 1
- Passing context to datasource loses it's reference, meaning, we cannot mutate the context between the resolver and datasources. HOT 2
- Provide basic CSS formatting for markdown rendered in description fields for the sandbox
- Redirect in Context HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-server.