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-azure-function first implementation. #1753

Merged
merged 16 commits into from Nov 6, 2018

Conversation

leo-buneev
Copy link
Contributor

@leo-buneev leo-buneev commented Sep 30, 2018

Closes #1752.
Added info about azure-function and cloud-function to readme.md

TODO:

  • Update CHANGELOG.md with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

Closes apollographql#1752.
Added info about azure-function and cloud-function to readme.md
@ghost ghost added the ⛲️ feature New addition or enhancement to existing solutions label Sep 30, 2018
@apollo-cla
Copy link

@leo-buneev: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@codecov-io
Copy link

codecov-io commented Sep 30, 2018

Codecov Report

Merging #1753 into master will decrease coverage by 15.7%.
The diff coverage is 78.94%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1753       +/-   ##
===========================================
- Coverage    90.2%   74.49%   -15.71%     
===========================================
  Files           5       31       +26     
  Lines         194     1243     +1049     
  Branches       38      329      +291     
===========================================
+ Hits          175      926      +751     
- Misses         18      306      +288     
- Partials        1       11       +10
Impacted Files Coverage Δ
...s/apollo-server-azure-function/src/ApolloServer.ts 77.19% <77.19%> (ø)
...o-server-azure-function/src/azureFunctionApollo.ts 84.21% <84.21%> (ø)
packages/apollo-server-koa/src/ApolloServer.ts 90.76% <0%> (-0.79%) ⬇️
packages/apollo-server-express/src/ApolloServer.ts 90% <0%> (-0.63%) ⬇️
...ackages/apollo-server-express/src/expressApollo.ts 86.36% <0%> (ø) ⬆️
packages/apollo-server-express/src/index.ts 100% <0%> (ø) ⬆️
...kages/apollo-datasource-rest/src/RESTDataSource.ts 86.41% <0%> (ø)
...s/apollo-server-cloud-function/src/ApolloServer.ts 43.63% <0%> (ø)
...ackages/apollo-server-cache-memcached/src/index.ts 100% <0%> (ø)
packages/apollo-server-core/src/graphqlOptions.ts 75% <0%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c757fe5...aca15c5. Read the comment docs.

@hsdhillon
Copy link

@leo-buneev thanks for the good work on this. It seems like PR is stuck in the review process. Can you please rebase the branch again so someone from the core team can review and merge it. I can really use the Azure function support in Apollo Server.

@leo-buneev
Copy link
Contributor Author

@hsdhillon Sure, will do tomorrow.

michaelwatson93 and others added 8 commits November 6, 2018 07:45
- Introduced willStart call from ApolloServerBase in the createHandler. This is similar to what is done in Lambda.
- Update scripts for compiling
- Bumbp version to alpha
Include reference to apollo-server-function into tsconfig for testing and the root project package.json
Copy link
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple changes, but I think we can get this into an alpha release! @michaelwatson93 went ahead and applied the appropriate updates from the master branch (since many changes are not easily or intuitively mergeable) and I've followed up with a couple changes to the package-lock.json and README.md/CHANGELOG.md.

};
};

export enum HttpStatusCodes {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great if we could include these definitions from somewhere else!

Copy link
Contributor Author

@leo-buneev leo-buneev Nov 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to use existing external definitions, but they were incomplete/outdated.
Do you think I should publish typings as a separate package?

@abernix abernix merged commit 5b64cf9 into apollographql:master Nov 6, 2018
@abernix
Copy link
Member

abernix commented Nov 6, 2018

Published as apollo-server-azure-function@2.2.0-alpha.4.

@abernix
Copy link
Member

abernix commented Nov 6, 2018

Thank you so much for working on this @leo-buneev!

(And thanks to @michael-watson for wrapping it up!)

@hsdhillon
Copy link

Thanks for your work @leo-buneev and thanks to @abernix for merging and publishing the package.

I quickly wanted to point out that package is published as apollo-server-azure-function whereas the documentation refers to package name with "s" at the end. apollo-server-azure-functions points to package with 1.x release. Attached screenshot shows the search result on npmjs

selection_199

@leo-buneev
Copy link
Contributor Author

I'm happy to help. @abernix @michaelwatson93 thank you for wrapping it up and merging!

@divyenduz
Copy link
Contributor

@leo-buneev : Thanks for the awesome work 🙌

When will this be available to use? Also, I saw that the name is apollo-server-azure-function at some places and apollo-server-azure-functions at some places, in fact, only yesterday, I got a PR merged that has different name than this PR: https://github.com/apollographql/apollo-server/pull/1938/files

Can you please help me with this 🙂

@divyenduz
Copy link
Contributor

Published as apollo-server-azure-function@2.2.0-alpha.4.

I think this is apollo-server-azure-functions@2.2.0-alpha.4. Can you please confirm? @abernix

@divyenduz
Copy link
Contributor

I am unable to get this to work, I get a blank screen at the moment. Here is a reproduction: https://github.com/divyenduz/apoll-server-azure-function

@divyenduz
Copy link
Contributor

Ah! this worked, after using $return as mentioned here: https://github.com/apollographql/apollo-server/pull/1753/files#diff-efb81a2b2121744f5c5529cf58a2f1d7R67

@abernix
Copy link
Member

abernix commented Nov 9, 2018

Glad you got it working @divyenduz ! Maybe we should make that portion more clear in the documentation.

@abernix abernix added this to the Release 2.2.0 milestone Nov 14, 2018
@abernix abernix removed this from the Release 2.x milestone Jun 28, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⛲️ feature New addition or enhancement to existing solutions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure functions integration
7 participants