gatsby-source-behance icon indicating copy to clipboard operation
gatsby-source-behance copied to clipboard

Cannot query field "allBehanceProjects"

Open penhold3r opened this issue 5 years ago • 0 comments

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)"
      ]
    }
  ]
}

penhold3r avatar May 23 '19 20:05 penhold3r