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

refactor resolvers; enforce graphQL api required fields #217

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

lihebi
Copy link
Collaborator

@lihebi lihebi commented Feb 23, 2023

  1. resolvers now import Query and Mutation from sub files:
import UserResolver from "./resolver_user";
import RepoResolver from "./resolver_repo";
import RuntimeResolver from "./resolver_runtime";
import ExportResolver from "./resolver_export";

export const resolvers = {
  Query: {
    ...UserResolver.Query,
    ...RepoResolver.Query,
    ...RuntimeResolver.Query,
  },
  Mutation: {
    ...UserResolver.Mutation,
    ...RepoResolver.Mutation,
    ...RuntimeResolver.Mutation,
  },
};
  1. enforce the required fields of many GraphQL APIs so that missing of the fields will throw explicit errors, e.g.,

Screenshot 2023-02-23 at 5 28 49 PM

@lihebi lihebi merged commit 6cbc895 into codepod-io:main Feb 23, 2023
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

Successfully merging this pull request may close these issues.

1 participant