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

Cannot query field "allBehanceProjects" #3

Open
penhold3r opened this issue May 23, 2019 · 0 comments
Open

Cannot query field "allBehanceProjects" #3

penhold3r opened this issue May 23, 2019 · 0 comments

Comments

@penhold3r
Copy link

Hi, i'm in a fresh gatsby site created with the cli "gatsby new", i installed the plugin and added to de gatsby-config file, no error when runing "gatsby develop" but the GraphiQL inspector says that the query doesn't exist:

config file

module.exports = {
	siteMetadata: {
		title: `Gatsby Default Starter`,
		description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
		author: `@gatsbyjs`
	},
	plugins: [
		{
			resolve: `gatsby-source-behance`,
			options: {
				// Visit your profile and grab the name after behance.net/<< username >>
				username: 'penhold3r',
				// You can get your API Key here: https://www.behance.net/dev/register
				apiKey: '********************************************'
			}
		},
		`gatsby-plugin-react-helmet`,
		{
			resolve: `gatsby-source-filesystem`,
			options: {
				name: `images`,
				path: `${__dirname}/src/images`
			}
		},
		`gatsby-transformer-sharp`,
		`gatsby-plugin-sharp`,
		{
			resolve: `gatsby-plugin-manifest`,
			options: {
				name: `gatsby-starter-default`,
				short_name: `starter`,
				start_url: `/`,
				background_color: `#663399`,
				theme_color: `#663399`,
				display: `minimal-ui`,
				icon: `src/images/gatsby-icon.png` // This path is relative to the root of the site.
			}
		}
		// this (optional) plugin enables Progressive Web App + Offline functionality
		// To learn more, visit: https://gatsby.dev/offline
		// `gatsby-plugin-offline`,
	]
}

GraphiQL response

{
  allBehanceProjects {
    edges {
      node {
        name
      }
    }
  }
}
{
  "errors": [
    {
      "message": "Cannot query field \"allBehanceProjects\" on type \"Query\".",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "stack": [
        "GraphQLError: Cannot query field \"allBehanceProjects\" on type \"Query\".",
        "    at Object.Field (C:\\Users\\PH\\Documents\\WEB\\www\\penholder-gatsby\\node_modules\\graphql\\validation\\rules\\FieldsOnCorrectType.js:64:31)",
        "    at Object.enter (C:\\Users\\PH\\Documents\\WEB\\www\\penholder-gatsby\\node_modules\\graphql\\language\\visitor.js:332:29)",
        "    at Object.enter (C:\\Users\\PH\\Documents\\WEB\\www\\penholder-gatsby\\node_modules\\graphql\\language\\visitor.js:383:25)",
        "    at visit (C:\\Users\\PH\\Documents\\WEB\\www\\penholder-gatsby\\node_modules\\graphql\\language\\visitor.js:250:26)",
        "    at validate (C:\\Users\\PH\\Documents\\WEB\\www\\penholder-gatsby\\node_modules\\graphql\\validation\\validate.js:63:22)",
        "    at C:\\Users\\PH\\Documents\\WEB\\www\\penholder-gatsby\\node_modules\\express-graphql\\dist\\index.js:154:52",
        "    at process._tickCallback (internal/process/next_tick.js:68:7)"
      ]
    }
  ]
}
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

1 participant