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

Resolver Mappings #25

Closed
jpstrikesback opened this issue Feb 2, 2018 · 5 comments
Closed

Resolver Mappings #25

jpstrikesback opened this issue Feb 2, 2018 · 5 comments

Comments

@jpstrikesback
Copy link
Collaborator

Just a quick note to say I'm going to be working on making the resolver mappings a bit more generalized.

Am I right to think that the serverless.yml should drive the resolver mappings? i.e.:

  • look for resolver mappings via the mappingTemplates key:
mappingTemplates:
  - dataSource: Tweets
    type: User
    field: topTweet
    request: "topTweet-request-mapping-template.txt"
    response: "topTweet-response-mapping-template.txt"
  - dataSource: Users
    type: Query
    field: meInfo
    request: "meInfo-request-mapping-template.txt"
    response: "meInfo-response-mapping-template.txt"
...
  • createResolver for each discovered mapping
@sid88in
Copy link
Owner

sid88in commented Feb 2, 2018

perfect!

If you want we can hop on skype or something today and I can give you a rundown of the process using example in https://github.com/serverless/serverless-graphql with deployment steps. Also, curious if you already have access to appsync?

Also, yes IMO serverless yml should drive the mappings and we should also give the location of the mapping templates in the directory.

@jpstrikesback
Copy link
Collaborator Author

Awesome, there's something for initial review up now in #27

I do have AppSync access, I'm going to keep trying to get more going this weekend, like maybe the elastic search stuff, so if we get a chance to hop on a call or IM or chat over issues today/next week that would be great!

@sid88in
Copy link
Owner

sid88in commented Feb 2, 2018

sounds good

@sid88in
Copy link
Owner

sid88in commented Feb 2, 2018

@jpstrikesback thanks for fixing this!

@sid88in sid88in closed this as completed Feb 2, 2018
@jpstrikesback
Copy link
Collaborator Author

Cheers!

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

2 participants