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 functions example does not work #1135

Closed
andyce1010 opened this issue Jun 4, 2018 · 8 comments
Closed

apollo server azure functions example does not work #1135

andyce1010 opened this issue Jun 4, 2018 · 8 comments

Comments

@andyce1010
Copy link

I have followed these steps to try and get an azure function working:

  1. Created an new azure function
  2. Pasted in the example code from:
    https://www.apollographql.com/docs/apollo-server/servers/azure-functions.html#GraphQL
  3. Used the Kudu control to install the npm dependancies for apollo-server-azure-functions and graphql-tools.

I have Run the function with the following as the post body:
{
rands {
id
rand
}
}

But the function throws a 500 error with the following:
2018-06-04T14:19:49.373 [Error] Exception while executing function: Functions.HttpTriggerJS1. mscorlib: SyntaxError: Unexpected token r in JSON at position 9
at Object.parse (native)
at graphqlHandler (D:\home\site\wwwroot\node_modules\apollo-server-azure-functions\dist\azureFunctionsApollo.js:20:39)
at run (D:\home\site\wwwroot\HttpTriggerJS1\index.js:31:36)
at D:\Program Files (x86)\SiteExtensions\Functions\1.0.11702\bin\azurefunctions\functions.js:106:24.

Have I missed a step, or is something broken in the example?

@evans
Copy link
Contributor

evans commented Jun 29, 2018

@andyce1010 Apologies for the long overdue response. Did you end up resolving the issue? We're working towards AS2, so I'm curious your status and how we'll have to update for #1088

Joining the Apollo Slack https://www.apollographql.com/slack should get you a faster answer in the future

@evans
Copy link
Contributor

evans commented Jul 17, 2018

I'm going to close this, since it hasn't had any updates and the example doesn't seem to be broken

@evans evans closed this as completed Jul 17, 2018
@simonaco
Copy link
Contributor

@evans clicking on https://www.apollographql.com/docs/apollo-server/servers/azure-functions.html#GraphQL gives me Page Not found
Looks like you've followed a broken link or entered a URL that doesn't exist on this site.
. Also the npm package for Azure Functions (https://www.npmjs.com/package/apollo-server-azure-functions) links to a non-existent package.

@andyce1010
Copy link
Author

@evans Apologies for the late reply. I never did get it working, and I've moved on to something else now unfortunately.

@evans
Copy link
Contributor

evans commented Jul 18, 2018

@simonaco Thanks for pointing that out! https://www.apollographql.com/docs/apollo-server/v1/servers/azure-functions.html#GraphQL is where you'll find the version 1 documentation. That's odd, I see a package at https://www.npmjs.com/package/apollo-server-azure-functions at version 1.4.0. npm show apollo-server-azure-functions versions appears to agree. If you run into more issues, please open another issue

@simonaco
Copy link
Contributor

thanks @evans! on the npm package page if you try to navigate to the repository it will take you to this link https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-azure-functions which returns a 404.

@eric-kimbrel
Copy link

eric-kimbrel commented Aug 16, 2018

It looks like it was removed on this commit 40f9a49

@simonaco
Copy link
Contributor

thanks @eric-kimbrel

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants