In version 16, requiredFieldLogger was renamed to relayFieldLogger. (Commit link)
We are utilizing the latest versions of all relevant packages (react-relay, relay-runtime, @types/relay-runtime):
yarn list v1.22.19
warning Filtering by arguments is deprecated. Please use the pattern option instead.
├─ @types/react-relay@16.0.6
├─ @types/relay-runtime@14.1.23
├─ react-relay@16.2.0
├─ relay-compiler@16.2.0
└─ relay-runtime@16.2.0
However, upon inspecting the type definitions in @types/relay-runtime, it appears that the naming has not been updated, causing issues when passing the logger into the relay environment. To address this, we've implemented a workaround as follows:
import { requiredFieldLogger } from 'path/to/our/logger';
const environment = new Environment({
network,
store,
requiredFieldLogger, // required by the definition of EnvironmentConfig in @types/relay-runtime
// @ts-ignore
relayFieldLogger: requiredFieldLogger, // without this, we encounter a runtime error
});
While some discussions mention similar issues with outdated type definitions (link), they do not directly impact us.
Is there any plan to update the type definitions for version 16? If not, what would be the recommended path for contributing changes to the DefinitelyTyped repository?
In version 16, requiredFieldLogger was renamed to relayFieldLogger. (Commit link)
We are utilizing the latest versions of all relevant packages (react-relay, relay-runtime, @types/relay-runtime):
However, upon inspecting the type definitions in @types/relay-runtime, it appears that the naming has not been updated, causing issues when passing the logger into the relay environment. To address this, we've implemented a workaround as follows:
While some discussions mention similar issues with outdated type definitions (link), they do not directly impact us.
Is there any plan to update the type definitions for version 16? If not, what would be the recommended path for contributing changes to the DefinitelyTyped repository?