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

Bump to 1.0 #32

Open
nknapp opened this issue Feb 1, 2017 · 10 comments
Open

Bump to 1.0 #32

nknapp opened this issue Feb 1, 2017 · 10 comments

Comments

@nknapp
Copy link
Owner

nknapp commented Feb 1, 2017

@msiegenthaler Do you think there are any more major features missing on the project?
Otherwise, I would go to 1.0.0 after fixing #30.

@msiegenthaler
Copy link
Collaborator

Basically the only thing I see missing is support for custom scalar types. I'm not really sure how to tackle those - as of now I think the best way would be to just render them to any.

Anyway, I agree we should release 1.0.0 after fixing #30. Adding support for custom scalars should not break the 'API', so we can add that in 1.1.0.

@Birowsky
Copy link

Birowsky commented Aug 7, 2017

Hey, fellers! What's the hold up? This is the last package i need for a perfect server toolchain. And trust me, i've tried them all.

@nknapp
Copy link
Owner Author

nknapp commented Aug 7, 2017

I actually wanted to create some more docs, but then I got caught up in other projects.

If you need it, I can create 1.0.0 and update the docs later. The API should be stable already.

@Birowsky
Copy link

Birowsky commented Aug 7, 2017

The problem that I have is with the GraphqlField type. In your renderer code, it's:

type GraphqlField<Args, Result, Ctx> = Result | Promise<Result> |
        ((args: Args, context: Ctx) => Result | Promise<Result>)

However, based on the graphql types, it looks different:

export type GraphQLFieldResolver<TSource, TContext> = (
    source: TSource,
    args: { [argName: string]: any },
    context: TContext,
    info: GraphQLResolveInfo
) => any;

Am I maybe missing something? I'm new to graphql.

@nknapp
Copy link
Owner Author

nknapp commented Aug 7, 2017

I don't know where the GraphQLFieldResolver comes from. Is that Apollo? The interfaces generated by this project are not for Apollo. They can be implemented by the root-value used in this example: http://graphql.org/graphql-js/#writing-code. Have a look at the usage example in the README

@Birowsky
Copy link

Birowsky commented Aug 8, 2017

@nknapp
Copy link
Owner Author

nknapp commented Aug 8, 2017

Maybe there should be an option to generate Apollo code instead of the reference implementation. I could prepare the code to allow diffrent implementations. @msiegenthaler already thought about doing this.

@Birowsky
Copy link

Birowsky commented Aug 9, 2017

You guys have my cheerleading support :}

@msiegenthaler
Copy link
Collaborator

sorry, I was on vacation

basically there are two ways to use graphql with apollo:

  • default field resolver with a "smart" root object (what we are doing now)
  • write (or generate) your own field resolvers

I got confused by this as well first. We could generate the field resolvers, but I think it's easier and more portable the way we're doing it now. I actually had the generation written, but then discarded it (there should be a commit for that in the history if you're curious).

I'm using it with apollo as well, do you have problems using it with it?

@Birowsky
Copy link

Birowsky commented Aug 17, 2017

@msiegenthaler well, as I mentioned, the resolver types are incorrect. I already tried some naive approach, but the first problem that became apparent, is that the parent type is not JUST the parent entity from the graph, example a User {strength}, but it's actually User {strength, strengthId}. Because entities, as they come from the db, are not joined.. right? am I making myself clear? :}

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

3 participants