Skip to content

Commit

Permalink
Reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 13, 2024
1 parent 54d4aed commit 21fe9ad
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions packages/libraries/yoga/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { DocumentNode, ExecutionArgs, GraphQLError, GraphQLSchema, Kind, parse }
import {
createLRUCache,
DisposableSymbols,
mapMaybePromise,
YogaServer,
type GraphQLParams,
type Plugin,
Expand Down Expand Up @@ -182,25 +181,25 @@ export function useHive(clientOrOptions: HiveClient | HivePluginOptions): Plugin
hive = isHiveClient(clientOrOptions)
? clientOrOptions
: createHive({
...clientOrOptions,
agent: clientOrOptions.agent
? {
logger: {
// Hive Plugin should respect the given Yoga logger
error: (...args) => yoga.logger.error(...args),
info: (...args) => yoga.logger.info(...args),
},
...clientOrOptions.agent,
__testing: {
// Hive Plugin should respect the given FetchAPI, note that this is not `yoga.fetch`
fetch(...args) {
return yoga.fetchAPI.fetch(...args);
},
...clientOrOptions.agent.__testing,
},
}
: undefined,
});
...clientOrOptions,
agent: clientOrOptions.agent
? {
logger: {
// Hive Plugin should respect the given Yoga logger
error: (...args) => yoga.logger.error(...args),
info: (...args) => yoga.logger.info(...args),
},
...clientOrOptions.agent,
__testing: {
// Hive Plugin should respect the given FetchAPI, note that this is not `yoga.fetch`
fetch(...args) {
return yoga.fetchAPI.fetch(...args);
},
...clientOrOptions.agent.__testing,
},
}
: undefined,
});
void hive.info();
const { experimental__persistedDocuments } = hive;
if (!experimental__persistedDocuments) {
Expand Down

0 comments on commit 21fe9ad

Please sign in to comment.