apollo-server-integrations / apollo-server-integration-azure-functions

MIT License
28 stars 13 forks source link

Support for Azure Functions v4 (?) #41

Open django-speyk opened 1 year ago

django-speyk commented 1 year ago

Is there a way to switch to V4 of the Azure Functions? The docs say that you shouldn't have a function.json, but it seems that that is necessary to use startServerAndCreateHandler?

How should you use startServerAndCreateHandler in this no-json V4 model?

Thanks in advance!

nnoce14 commented 1 year ago

Encountering the same issue as well. Seems the package is still using @azure/functions^3.2.0 when it should be using @azure/functions 4.x which changed how function apps are defined in nodejs

aaronpowell commented 1 year ago

This is related to #42.

Azure Functions v4 is a new programming model for JavaScript/TypeScript and it sees quite a few changes to the types that are used, so it's not a direct upgrade. As it's still in public preview I'm holding off supporting Azure Functions v4.

gidich commented 1 year ago

Makes sense, if you do plan on creating a beta version on a separate branch and are looking for community support I believe some of us on this thread may be interested in helping.

aaronpowell commented 1 year ago

I did explore it early on (when we were prototyping v4) to see what the approach might look like for building libraries on top of the new programming model. I really wanted to do:

import { app } from "@azure/functions";

app.graphql(/* stuff here */);

But it's not possible and ended up having some discussion with the Functions team on what could be good options and there's a few to try but... well... time 😅

connordoner commented 11 months ago

Has any further progress been made on this issue, please? Happy (and eager!) to contribute but want to avoid duplicating anyone else's work. Thanks.

aaronpowell commented 11 months ago

No I haven't.

I've moved out of the JavaScript space at Microsoft so am rather time poor to tackle some of the stuff here.

connordoner commented 11 months ago

No worries, @AaronPowell! I'm happy to start pulling together a PR if you're willing/able to review it?

aaronpowell commented 11 months ago

No worries, @aaronpowell! I'm happy to start pulling together a PR if you're willing/able to review it?

More than happy to review

connordoner commented 11 months ago

Thanks! I might take a little while as I have lots of other stuff on my plate right now and I'm only just getting started with Azure Functions, but I'll submit a proof of concept in the next month or so, and we can no doubt all work towards improving it. Appreciate your help.

TengoCharlie commented 9 months ago

@aaronpowell I have fixed the current support of V4 in the current library, Am I allowed to contribute the code??

aaronpowell commented 9 months ago

@aaronpowell I have fixed the current support of V4 in the current library, Am I allowed to contribute the code??

Sure, submit a PR

TengoCharlie commented 9 months ago

Hello everyone, can someone help me set up the repository standard code with the solution?

douglas-wang commented 8 months ago

@aaronpowell @TengoCharlie is there any progress on this please? Azure functions v4 model is officially live now not in beta anymore.

here is the article for that release: https://azure.microsoft.com/en-us/updates/generally-available-azure-functions-v4-programming-model-for-nodejs/

Infracloud-harsh commented 8 months ago

@douglas-wang , am looking into it. Will raise a PR soon

TengoCharlie commented 8 months ago

@aaronpowell I have fixed the current support of V4 in the current library, Am I allowed to contribute the code??

Sure, submit a PR

I have changes the code as per the function V4. but i have a question that are we going to release another package for function v4 or we will provide support for v4 and v3 by same package?

aaronpowell commented 8 months ago

It'd be best to support them both in a single package

barddoo commented 7 months ago

@aaronpowell I just opened a PR to address this issue https://github.com/apollo-server-integrations/apollo-server-integration-azure-functions/pull/66

danielRChildrens commented 6 months ago

Thanks @barddoo, I have tested your PR and works perfectly with Azure functions v4.1.0 and Apollo server v4.10.0

gidich commented 4 months ago

@trevor-scheer / @BlenderDude / @michael-watson - This repo has gone stale from an Apollo support standpoint (the last update was 3 months ago) - several people need to update to Azure Functions Programming model v4, and this pull request is blocking them - It looks like @aaronpowell has their attention turned toward other Microsoft priorities, is this something you can help move forward in his absence? (e.g., reviewing and approving the PR)