Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apollo Server 2.0 and federation and MAP type as default return #29

Open
joeherold opened this issue Jul 31, 2019 · 0 comments
Open

Apollo Server 2.0 and federation and MAP type as default return #29

joeherold opened this issue Jul 31, 2019 · 0 comments

Comments

@joeherold
Copy link

With Apollo Server 2.0 and federation, I have to create an plain Object of the resolvers, that are given as a Map, that does not work with

import { buildFederatedSchema } from "@apollo/federation";
// import the default object (is a Map)
import CustomScalars from "@saeris/graphql-scalars";

// generat plain object for the resolvers
let scalarResolversObject = {};
CustomScalars.forEach((item, key) => {
  scalarResolversObject[key.replace("scalar ", "")] = item;
});
let scalarTypeDefs = CustomScalars.keys();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant