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

Support for Azure Functions v4 (?) #41

Open
django-speyk opened this issue Apr 4, 2023 · 20 comments
Open

Support for Azure Functions v4 (?) #41

django-speyk opened this issue Apr 4, 2023 · 20 comments

Comments

@django-speyk
Copy link

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
Copy link

nnoce14 commented Apr 18, 2023

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
Copy link
Collaborator

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
Copy link

gidich commented May 3, 2023

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
Copy link
Collaborator

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 😅

@connorgurney-personal
Copy link

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
Copy link
Collaborator

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.

@connorgurney-personal
Copy link

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

@aaronpowell
Copy link
Collaborator

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

@connorgurney-personal
Copy link

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
Copy link

TengoCharlie commented Sep 25, 2023

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

@aaronpowell
Copy link
Collaborator

@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
Copy link

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

@douglas-wang
Copy link

douglas-wang commented Oct 23, 2023

@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
Copy link

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

@TengoCharlie
Copy link

@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
Copy link
Collaborator

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

@barddoo
Copy link

barddoo commented Nov 22, 2023

@aaronpowell I just opened a PR to address this issue #66

@danielRChildrens
Copy link

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

@gidich
Copy link

gidich commented Feb 20, 2024

@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)

@charlesgardyn
Copy link
Contributor

As a follow up on this, I just noticed that one cannot access the body in the get context function as one could in V3, as the body can only be parsed once.
#77

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